本文整理匯總了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;
}