當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。