Search in sources :

Example 26 with Animator

use of com.nineoldandroids.animation.Animator in project PhotoNoter by yydcdut.

the class PhotoDetailActivity method showWidget.

@Override
public void showWidget(final IPhotoDetailPresenter.OnAnimationAdapter onAnimationAdapter) {
    AnimatorSet animation = new AnimatorSet();
    animation.setDuration(1000);
    animation.playTogether(ObjectAnimator.ofFloat(mAppBarLayout, "Y", -getActionBarSize() - (AppCompat.AFTER_LOLLIPOP ? getStatusBarSize() : 0), AppCompat.AFTER_LOLLIPOP ? getStatusBarSize() : 0), ObjectAnimator.ofFloat(mBottomLayout, "Y", mBottomLayout.getTop() + getActionBarSize(), mBottomLayout.getTop()), ObjectAnimator.ofFloat(mStatusCoverView, "Y", -getActionBarSize(), 0f));
    animation.addListener(new AnimatorListenerAdapter() {

        @Override
        public void onAnimationStart(Animator animation) {
            if (onAnimationAdapter != null) {
                onAnimationAdapter.onAnimationStarted(IPhotoDetailPresenter.STATE_SHOW);
            }
        }

        @Override
        public void onAnimationEnd(Animator animation) {
            if (onAnimationAdapter != null) {
                onAnimationAdapter.onAnimationEnded(IPhotoDetailPresenter.STATE_SHOW);
            }
        }
    });
    animation.start();
}
Also used : ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator) Animator(com.nineoldandroids.animation.Animator) AnimatorListenerAdapter(com.nineoldandroids.animation.AnimatorListenerAdapter) AnimatorSet(com.nineoldandroids.animation.AnimatorSet)

Example 27 with Animator

use of com.nineoldandroids.animation.Animator in project AisenWeiBo by wangdan.

the class SupportAnimatorPreL method addListener.

@Override
public void addListener(final AnimatorListener listener) {
    Animator a = mAnimator.get();
    if (a == null) {
        return;
    }
    if (listener == null) {
        a.addListener(null);
        return;
    }
    a.addListener(new Animator.AnimatorListener() {

        @Override
        public void onAnimationStart(Animator animation) {
            listener.onAnimationStart();
        }

        @Override
        public void onAnimationEnd(Animator animation) {
            listener.onAnimationEnd();
        }

        @Override
        public void onAnimationCancel(Animator animation) {
            listener.onAnimationCancel();
        }

        @Override
        public void onAnimationRepeat(Animator animation) {
            listener.onAnimationRepeat();
        }
    });
}
Also used : Animator(com.nineoldandroids.animation.Animator)

Example 28 with Animator

use of com.nineoldandroids.animation.Animator in project AisenWeiBo by wangdan.

the class ArcAnimator method setupStartValues.

@Override
public void setupStartValues() {
    super.setupStartValues();
    Animator a = mAnimator.get();
    if (a != null)
        a.setupStartValues();
}
Also used : ValueAnimator(com.nineoldandroids.animation.ValueAnimator) Animator(com.nineoldandroids.animation.Animator)

Example 29 with Animator

use of com.nineoldandroids.animation.Animator in project AisenWeiBo by wangdan.

the class ArcAnimator method start.

@Override
public void start() {
    super.start();
    Animator a = mAnimator.get();
    if (a != null)
        a.start();
}
Also used : ValueAnimator(com.nineoldandroids.animation.ValueAnimator) Animator(com.nineoldandroids.animation.Animator)

Example 30 with Animator

use of com.nineoldandroids.animation.Animator in project AisenWeiBo by wangdan.

the class ArcAnimator method end.

@Override
public void end() {
    super.end();
    Animator a = mAnimator.get();
    if (a != null)
        a.end();
}
Also used : ValueAnimator(com.nineoldandroids.animation.ValueAnimator) Animator(com.nineoldandroids.animation.Animator)

Aggregations

Animator (com.nineoldandroids.animation.Animator)139 ValueAnimator (com.nineoldandroids.animation.ValueAnimator)83 AnimatorListenerAdapter (com.nineoldandroids.animation.AnimatorListenerAdapter)67 ObjectAnimator (com.nineoldandroids.animation.ObjectAnimator)53 AnimatorSet (com.nineoldandroids.animation.AnimatorSet)29 StateAnimator (carbon.animation.StateAnimator)28 View (android.view.View)27 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)13 Interpolator (android.view.animation.Interpolator)11 Reveal (carbon.internal.Reveal)11 RecyclerView (android.support.v7.widget.RecyclerView)6 AccelerateDecelerateInterpolator (android.view.animation.AccelerateDecelerateInterpolator)6 AccelerateInterpolator (android.view.animation.AccelerateInterpolator)6 ViewGroup (android.view.ViewGroup)5 SimpleItemAnimator (android.support.v7.widget.SimpleItemAnimator)4 OvershootInterpolator (android.view.animation.OvershootInterpolator)4 ArcAnimator (io.codetail.animation.arcanimator.ArcAnimator)4 Paint (android.graphics.Paint)3 Rect (android.graphics.Rect)3 GestureDetector (android.view.GestureDetector)3