当前位置: 首页>>代码示例>>Java>>正文


Java LayoutTransition.setInterpolator方法代码示例

本文整理汇总了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;
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:19,代码来源:AnimUtil.java

示例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;
}
 
开发者ID:breadwallet,项目名称:breadwallet-android,代码行数:20,代码来源:BRAnimator.java


注:本文中的android.animation.LayoutTransition.setInterpolator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。