@Override public void run() { calculate(); animatorSet.start(); } });
@Override public void onAnimationEnd(Animator animation) { if (mIsAnimatorCancel) return; if (animation instanceof ValueAnimator) { mRing.sweeping = mRing.sweep; } else if (animation instanceof AnimatorSet) { mRing.restore(); animatorSet.start(); } }
private Spruce(SpruceBuilder builder) throws IllegalArgumentException { this.viewGroup = builder.viewGroup; Animator[] animators = builder.animators; SortFunction sortFunction = builder.sortFunction; if (animators == null) { throw new IllegalArgumentException("Animator array must not be null"); } else if (sortFunction == null) { throw new IllegalArgumentException("SortFunction must not be null"); } getAnimatorSetForSort(animators, sortFunction).start(); }
@Override public void onRefresh() { if(!btnSexAnimatorSet.isStarted()){ btnSexAnimatorSet.start(); } }
@Override protected void animateAddImpl(final RecyclerView.ViewHolder holder) { View target = holder.itemView; View icon = target.findViewById(R.id.icon); Animator swing = ObjectAnimator.ofFloat(icon, "rotationX", 45, 0); swing.setInterpolator(new OvershootInterpolator(5)); View right = holder.itemView.findViewById(R.id.right); Animator rotateIn = ObjectAnimator.ofFloat(right, "rotationY", 90, 0); rotateIn.setInterpolator(new DecelerateInterpolator()); AnimatorSet animator = new AnimatorSet(); animator.setDuration(getAddDuration()); animator.playTogether(swing, rotateIn); animator.start(); }
@Override public boolean onPreDraw() { animatorSet.start(); waitForThisViewHeight.getViewTreeObserver().removeOnPreDrawListener(this); return false; } });
@Override public void translate(InfoBean bean, ExposeView parent, View child) { set.playTogether( ObjectAnimator.ofFloat(child, "translationX", 0, -bean.translationX), ObjectAnimator.ofFloat(child, "translationY", 0, -bean.translationY), ObjectAnimator.ofFloat(child, "scaleX", 1,1/bean.scale), ObjectAnimator.ofFloat(child, "scaleY", 1,1/bean.scale) ); set.setInterpolator(new AccelerateInterpolator()); set.setDuration(showDuration).start(); }
@Override public void loadPlaceholder(InfoBean bean, ImageView placeholder) { AnimatorSet set = new AnimatorSet(); set.playTogether( ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0), ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0) ); set.setInterpolator(new AccelerateInterpolator()); set.setDuration(showDuration / 4 * 5).start(); }
@Override public void loadPlaceholder(InfoBean bean, ImageView placeholder) { AnimatorSet set = new AnimatorSet(); set.playTogether( ObjectAnimator.ofFloat(placeholder,"rotation",0,180), ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0), ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0) ); set.setInterpolator(new AccelerateInterpolator()); set.setDuration(showDuration / 4 * 5).start(); }
@Override public void translate(InfoBean bean, ExposeView parent, View child) { set.playTogether( ObjectAnimator.ofFloat(child, "scaleY", 1) ); set.setInterpolator(new AccelerateInterpolator()); set.setDuration(showDuration).start(); }
@Override protected void showAfter() { View rootView = getRootView(); AnimatorSet animatorSet = new AnimatorSet(); ObjectAnimator alpha = ObjectAnimator.ofFloat(rootView, "alpha", 0, 1); ObjectAnimator translation = ObjectAnimator.ofFloat(rootView, "translationY", 300, 0); animatorSet.playTogether(alpha, translation); animatorSet.setDuration(1000); animatorSet.setInterpolator(new AccelerateInterpolator()); animatorSet.start(); }
@Override public void loadPlaceholder(InfoBean bean, ImageView placeholder) { AnimatorSet set = new AnimatorSet(); set.playTogether( ObjectAnimator.ofFloat(placeholder, "rotation", 0, 180), ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0), ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0) ); set.setInterpolator(new AccelerateInterpolator()); set.setDuration(showDuration / 4 * 5).start(); //placeholder.setVisibility(View.GONE); }
@Override public void loadPlaceholder(InfoBean bean, ImageView placeholder) { AnimatorSet set = new AnimatorSet(); set.playTogether( ObjectAnimator.ofFloat(placeholder, "rotation", 0, 180), ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0), ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0) ); set.setInterpolator(new AccelerateInterpolator()); set.setDuration(showDuration / 4 * 5).start(); } })
@Override public void loadPlaceholder(InfoBean bean, ImageView placeholder) { AnimatorSet set = new AnimatorSet(); set.playTogether( ObjectAnimator.ofFloat(placeholder, "rotation", 0, 180), ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0), ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0) ); set.setInterpolator(new AccelerateInterpolator()); set.setDuration(showDuration / 4 * 5).start(); }
private void enterAnimator() { ObjectAnimator alpha = ObjectAnimator.ofFloat(masker, "alpha", 0, 1); ObjectAnimator translationY = ObjectAnimator.ofFloat(listView, "translationY", listView.getHeight(), 0); AnimatorSet set = new AnimatorSet(); set.setDuration(400); set.playTogether(alpha, translationY); set.setInterpolator(new AccelerateDecelerateInterpolator()); set.start(); }
public void start() { if (mAnimationStarted) { return; } if (animator == null || animatorSet == null) { mRing.reset(); buildAnimator(); } animator.start(); animatorSet.start(); mAnimationStarted = true; mIsAnimatorCancel = false; }
private void animate(Interpolator interpolator, long duration, ValueAnimator first, ValueAnimator... animators) { animator = new AnimatorSet(); animator.setDuration(duration); animator.setInterpolator(interpolator); animator.addListener(animatorListener); AnimatorSet.Builder builder = animator.play(first); for(ValueAnimator valueAnimator : animators) { builder.with(valueAnimator); } animator.start(); } }
public void start(View view) { reset(view); setupAnimation(view); mAnimatorSet.start(); }
RichPathAnimator start() { if (prev != null) { prev.start(); } else { animatorSet = createAnimatorSet(); animatorSet.start(); } return this; }
@Override public void onStartAnimator(@NonNull RefreshLayout layout, int height, int maxDragHeight) { super.onStartAnimator(layout, height, maxDragHeight); final View topView = mMaskViewTop; final View shadowView = mShadowView; final View bottomView = mMaskViewBottom; final AnimatorSet animatorSet = new AnimatorSet(); animatorSet.play(ObjectAnimator.ofFloat(topView, "translationY", topView.getTranslationY(), -mHalfHeaderHeight)) .with(ObjectAnimator.ofFloat(bottomView, "translationY", bottomView.getTranslationY(), mHalfHeaderHeight)) .with(ObjectAnimator.ofFloat(shadowView, "alpha", shadowView.getAlpha(), 0)); animatorSet.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { topView.setVisibility(View.GONE); bottomView.setVisibility(View.GONE); shadowView.setVisibility(View.GONE); postStatus(FunGameView.STATUS_GAME_PLAY); } }); animatorSet.setDuration(800); animatorSet.setStartDelay(200); animatorSet.start(); }