当前位置: 首页>>代码示例>>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;未经允许,请勿转载。