本文整理汇总了Java中android.animation.LayoutTransition.setInterpolator方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutTransition.setInterpolator方法的具体用法?Java LayoutTransition.setInterpolator怎么用?Java LayoutTransition.setInterpolator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.animation.LayoutTransition
的用法示例。
在下文中一共展示了LayoutTransition.setInterpolator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: a
import android.animation.LayoutTransition; //导入方法依赖的package包/类
private static LayoutTransition a()
{
LayoutTransition layouttransition = new LayoutTransition();
layouttransition.setDuration(90L);
layouttransition.setInterpolator(2, new AccelerateDecelerateInterpolator());
layouttransition.setInterpolator(3, new AccelerateDecelerateInterpolator());
ObjectAnimator objectanimator = ObjectAnimator.ofFloat(null, "rotationX", new float[] {
90F, 0.0F
}).setDuration(layouttransition.getDuration(2));
layouttransition.setAnimator(2, objectanimator);
objectanimator.addListener(new d());
ObjectAnimator objectanimator1 = ObjectAnimator.ofFloat(null, "rotationX", new float[] {
0.0F, -90F
}).setDuration(layouttransition.getDuration(3));
layouttransition.setAnimator(3, objectanimator1);
objectanimator1.addListener(new e());
return layouttransition;
}
示例2: getDefaultTransition
import android.animation.LayoutTransition; //导入方法依赖的package包/类
public static LayoutTransition getDefaultTransition() {
LayoutTransition itemLayoutTransition = new LayoutTransition();
itemLayoutTransition.setStartDelay(LayoutTransition.APPEARING, 0);
itemLayoutTransition.setStartDelay(LayoutTransition.DISAPPEARING, 0);
itemLayoutTransition.setStartDelay(LayoutTransition.CHANGE_APPEARING, 0);
itemLayoutTransition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
itemLayoutTransition.setStartDelay(LayoutTransition.CHANGING, 0);
itemLayoutTransition.setDuration(100);
itemLayoutTransition.setInterpolator(LayoutTransition.CHANGING, new OvershootInterpolator(2f));
Animator scaleUp = ObjectAnimator.ofPropertyValuesHolder((Object) null, PropertyValuesHolder.ofFloat(View.SCALE_X, 1, 1), PropertyValuesHolder.ofFloat(View.SCALE_Y, 0, 1));
scaleUp.setDuration(50);
scaleUp.setStartDelay(50);
Animator scaleDown = ObjectAnimator.ofPropertyValuesHolder((Object) null, PropertyValuesHolder.ofFloat(View.SCALE_X, 1, 1), PropertyValuesHolder.ofFloat(View.SCALE_Y, 1, 0));
scaleDown.setDuration(2);
itemLayoutTransition.setAnimator(LayoutTransition.APPEARING, scaleUp);
itemLayoutTransition.setAnimator(LayoutTransition.DISAPPEARING, null);
itemLayoutTransition.enableTransitionType(LayoutTransition.CHANGING);
return itemLayoutTransition;
}