下面列出了android.view.animation.LayoutAnimationController#setInterpolator() 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private void init() {
widthScale(0.95f);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 6f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(350);
animation.setStartOffset(150);
mLac = new LayoutAnimationController(animation, 0.12f);
mLac.setInterpolator(new DecelerateInterpolator());
}
private LayoutAnimationController getLayoutAnimation() {
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 2f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(550);
LayoutAnimationController layoutAnimationController = new LayoutAnimationController(animation, 0.12f);
layoutAnimationController.setInterpolator(new DecelerateInterpolator());
return layoutAnimationController;
}
private void init() {
widthScale(0.95f);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 6f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(350);
animation.setStartOffset(150);
mLac = new LayoutAnimationController(animation, 0.12f);
mLac.setInterpolator(new DecelerateInterpolator());
}
private void init() {
widthScale(0.95f);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 6f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(350);
animation.setStartOffset(150);
mLac = new LayoutAnimationController(animation, 0.12f);
mLac.setInterpolator(new DecelerateInterpolator());
}
private void init() {
widthScale(0.8f);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 2f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(550);
mLac = new LayoutAnimationController(animation, 0.12f);
mLac.setInterpolator(new DecelerateInterpolator());
}
private void initListViewAnim() {
Animation animation = AnimationUtils.loadAnimation(this, R.anim.right_in);
LayoutAnimationController controller = new LayoutAnimationController(animation);
controller.setDelay(0.3f);
controller.setOrder(0);
controller.setInterpolator(new EaseCubicInterpolator(0.47f, 0.01f, 0.44f, 0.99f));
rcvCurrentFiles.setLayoutAnimation(controller);
}
private void init() {
widthScale(0.95f);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 6f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(350);
animation.setStartOffset(150);
mLac = new LayoutAnimationController(animation, 0.12f);
mLac.setInterpolator(new DecelerateInterpolator());
}
private void init() {
widthScale(0.8f);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 2f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(550);
mLac = new LayoutAnimationController(animation, 0.12f);
mLac.setInterpolator(new DecelerateInterpolator());
}
public void listAnim()
{
LayoutAnimationController layoutanimationcontroller = new LayoutAnimationController(AnimationUtils.loadAnimation(this, 0x7f040008));
layoutanimationcontroller.setOrder(0);
layoutanimationcontroller.setInterpolator(new DecelerateInterpolator());
layoutanimationcontroller.setDelay(0.5F);
G.setLayoutAnimation(layoutanimationcontroller);
}