當前位置: 首頁>>代碼示例>>Java>>正文


Java AnimatorSet.playSequentially方法代碼示例

本文整理匯總了Java中com.nineoldandroids.animation.AnimatorSet.playSequentially方法的典型用法代碼示例。如果您正苦於以下問題:Java AnimatorSet.playSequentially方法的具體用法?Java AnimatorSet.playSequentially怎麽用?Java AnimatorSet.playSequentially使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.nineoldandroids.animation.AnimatorSet的用法示例。


在下文中一共展示了AnimatorSet.playSequentially方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setOpenCloseAnimation

import com.nineoldandroids.animation.AnimatorSet; //導入方法依賴的package包/類
/**
 * Creates Open / Close AnimatorSet
 */
private AnimatorSet setOpenCloseAnimation(boolean isCloseAnimation) {
    List<Animator> textAnimations = new ArrayList<>();
    List<Animator> imageAnimations = new ArrayList<>();

    if (isCloseAnimation) {
        for (int i = getItemCount() - 1; i >= 0; i--) {
            fillOpenClosingAnimations(true, textAnimations, imageAnimations, i);
        }
    } else {
        for (int i = 0; i < getItemCount(); i++) {
            fillOpenClosingAnimations(false, textAnimations, imageAnimations, i);
        }
    }

    AnimatorSet textCloseAnimatorSet = new AnimatorSet();
    textCloseAnimatorSet.playSequentially(textAnimations);

    AnimatorSet imageCloseAnimatorSet = new AnimatorSet();
    imageCloseAnimatorSet.playSequentially(imageAnimations);

    AnimatorSet animatorFullSet = new AnimatorSet();
    animatorFullSet.playTogether(imageCloseAnimatorSet, textCloseAnimatorSet);
    animatorFullSet.setDuration(mAnimationDurationMilis);
    animatorFullSet.addListener(mCloseOpenAnimatorListener);
    animatorFullSet.setStartDelay(0);
    animatorFullSet.setInterpolator(new HesitateInterpolator());
    return animatorFullSet;
}
 
開發者ID:zongkaili,項目名稱:MenuSet,代碼行數:32,代碼來源:MenuAdapter.java

示例2: getView

import com.nineoldandroids.animation.AnimatorSet; //導入方法依賴的package包/類
@Override
@NonNull
public View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent) {
    final View view = super.getView(position, convertView, parent);

    if (mInsertQueue.getActiveIndexes().contains(position)) {
        int widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(ViewGroup.LayoutParams.MATCH_PARENT, View.MeasureSpec.AT_MOST);
        int heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(ViewGroup.LayoutParams.WRAP_CONTENT, View.MeasureSpec.UNSPECIFIED);
        view.measure(widthMeasureSpec, heightMeasureSpec);

        int originalHeight = view.getMeasuredHeight();

        ValueAnimator heightAnimator = ValueAnimator.ofInt(1, originalHeight);
        heightAnimator.addUpdateListener(new HeightUpdater(view));

        Animator[] customAnimators = getAdditionalAnimators(view, parent);
        Animator[] animators = new Animator[customAnimators.length + 1];
        animators[0] = heightAnimator;
        System.arraycopy(customAnimators, 0, animators, 1, customAnimators.length);

        AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.playTogether(animators);

        ViewHelper.setAlpha(view, 0);
        ObjectAnimator alphaAnimator = ObjectAnimator.ofFloat(view, ALPHA, 0, 1);

        AnimatorSet allAnimatorsSet = new AnimatorSet();
        allAnimatorsSet.playSequentially(animatorSet, alphaAnimator);

        allAnimatorsSet.setDuration(mInsertionAnimationDurationMs);
        allAnimatorsSet.addListener(new ExpandAnimationListener(position));
        allAnimatorsSet.start();
    }

    return view;
}
 
開發者ID:sathishmscict,項目名稱:ListViewAnimations,代碼行數:37,代碼來源:AnimateAdditionAdapter.java

示例3: animationSequence

import com.nineoldandroids.animation.AnimatorSet; //導入方法依賴的package包/類
/**
 * 動畫隊列
 * @param animators
 * @return
 */
@NonNull
public static Animator animationSequence(@NonNull Animator... animators) {
    AnimatorSet set = new AnimatorSet();
    set.playSequentially(animators);

    return set;
}
 
開發者ID:canyinghao,項目名稱:CanAnimation,代碼行數:13,代碼來源:CanAnimation.java

示例4: getAnimator

import com.nineoldandroids.animation.AnimatorSet; //導入方法依賴的package包/類
private Animator getAnimator(View target){
    AnimatorSet set = getEnterAnimtor(target);

    ValueAnimator bezierValueAnimator = getBezierValueAnimator(target);

    AnimatorSet finalSet = new AnimatorSet();
    finalSet.playSequentially(set);
    finalSet.playSequentially(set, bezierValueAnimator);
    finalSet.setInterpolator(mInterpolators[mRandom.nextInt(4)]);
    finalSet.setTarget(target);
    return finalSet;
}
 
開發者ID:HomHomLin,項目名稱:AndroidEmanteAnimtor,代碼行數:13,代碼來源:EmanateView.java

示例5: build

import com.nineoldandroids.animation.AnimatorSet; //導入方法依賴的package包/類
public AnimatorSet build(){
    AnimatorSet animatorSet = new AnimatorSet();
    animatorSet.playSequentially(animatorChain);
    return animatorSet;
}
 
開發者ID:jrconlin,項目名稱:mc_backup,代碼行數:6,代碼來源:BounceAnimatorBuilder.java


注:本文中的com.nineoldandroids.animation.AnimatorSet.playSequentially方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。