Search in sources :

Example 61 with ObjectAnimator

use of android.animation.ObjectAnimator in project PaymentKit-Droid by brendanw.

the class CardIcon method alphaIn.

private void alphaIn(View v) {
    ObjectAnimator alphaIn = ObjectAnimator.ofFloat(v, "alpha", 1.0f).setDuration(0);
    alphaIn.start();
}
Also used : ObjectAnimator(android.animation.ObjectAnimator)

Example 62 with ObjectAnimator

use of android.animation.ObjectAnimator in project PaymentKit-Droid by brendanw.

the class CardIcon method flipToFront.

private void flipToFront() {
    ViewUtils.setHardwareLayer(mBackFace);
    ObjectAnimator rotateBackFace = ObjectAnimator.ofFloat(mBackFace, "scaleX", 1.0f, 0.0f);
    rotateBackFace.setDuration(HALF_FLIP_DURATION);
    ViewUtils.setLayerTypeNone(mFrontFace);
    final ObjectAnimator rotateFrontFace = ObjectAnimator.ofFloat(mFrontFace, "scaleX", 0.0f, 1.0f);
    rotateFrontFace.setDuration(HALF_FLIP_DURATION);
    rotateFrontFace.addListener(new AnimatorListenerAdapter() {

        @Override
        public void onAnimationEnd(Animator anim) {
            ViewUtils.setLayerTypeNone(mBackFace);
        }
    });
    rotateBackFace.addListener(new AnimatorListenerAdapter() {

        @Override
        public void onAnimationEnd(Animator anim) {
            alphaOut(mBackFace);
            ViewUtils.setLayerTypeNone(mBackFace);
            alphaIn(mFrontFace);
            rotateFrontFace.start();
        }
    });
    rotateBackFace.start();
}
Also used : ObjectAnimator(android.animation.ObjectAnimator) Animator(android.animation.Animator) ObjectAnimator(android.animation.ObjectAnimator) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter)

Example 63 with ObjectAnimator

use of android.animation.ObjectAnimator in project slideuppane by briangriffey.

the class SlideUpPane method slideToTranslation.

private void slideToTranslation(float translation) {
    ObjectAnimator animator = ObjectAnimator.ofFloat(this, "translationY", getTranslationY(), translation).setDuration(ANIMATION_TIME);
    animator.setInterpolator(new OvershootInterpolator(1.2f));
    if (mAnimatorListener != null)
        animator.addListener(mAnimatorListener);
    animator.start();
}
Also used : OvershootInterpolator(android.view.animation.OvershootInterpolator) ObjectAnimator(android.animation.ObjectAnimator)

Example 64 with ObjectAnimator

use of android.animation.ObjectAnimator in project RecyclerViewItemAnimators by gabrielemariotti.

the class ScaleInAnimatorAdapter method getAnimators.

@NonNull
@Override
public Animator[] getAnimators(@NonNull View view) {
    ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, SCALE_X, mScaleFrom, 1f);
    ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, SCALE_Y, mScaleFrom, 1f);
    return new ObjectAnimator[] { scaleX, scaleY };
}
Also used : ObjectAnimator(android.animation.ObjectAnimator) NonNull(android.support.annotation.NonNull)

Example 65 with ObjectAnimator

use of android.animation.ObjectAnimator in project ExpectAnim by florent37.

the class ExpectAnim method reset.

public void reset() {
    final ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(this, "percent", 1f, 0f);
    objectAnimator.setDuration(duration);
    if (interpolator != null) {
        objectAnimator.setInterpolator(interpolator);
    }
    objectAnimator.start();
}
Also used : ObjectAnimator(android.animation.ObjectAnimator)

Aggregations

ObjectAnimator (android.animation.ObjectAnimator)791 Animator (android.animation.Animator)313 AnimatorSet (android.animation.AnimatorSet)214 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)208 PropertyValuesHolder (android.animation.PropertyValuesHolder)128 ValueAnimator (android.animation.ValueAnimator)111 View (android.view.View)102 Paint (android.graphics.Paint)68 TextView (android.widget.TextView)49 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)48 ViewGroup (android.view.ViewGroup)45 Rect (android.graphics.Rect)35 LinearInterpolator (android.view.animation.LinearInterpolator)35 ImageView (android.widget.ImageView)31 AccelerateDecelerateInterpolator (android.view.animation.AccelerateDecelerateInterpolator)30 AccelerateInterpolator (android.view.animation.AccelerateInterpolator)29 OvershootInterpolator (android.view.animation.OvershootInterpolator)29 ArrayList (java.util.ArrayList)22 TargetApi (android.annotation.TargetApi)21 Interpolator (android.view.animation.Interpolator)20