本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例5: build
import com.nineoldandroids.animation.AnimatorSet; //導入方法依賴的package包/類
public AnimatorSet build(){
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playSequentially(animatorChain);
return animatorSet;
}