Search in sources :

Example 1 with AnimatorSet

use of com.nineoldandroids.animation.AnimatorSet in project AndroidViewHover by daimajia.

the class BlurLayout method startBlurImageDisappearAnimator.

private void startBlurImageDisappearAnimator() {
    if (!enableBlurBackground || mBlurImage == null)
        return;
    AnimatorSet set = new AnimatorSet();
    if (enableBackgroundZoom)
        set.playTogether(ObjectAnimator.ofFloat(mBlurImage, "alpha", 1f, 0.8f), ObjectAnimator.ofFloat(mBlurImage, "scaleX", mZoomRatio, 1f), ObjectAnimator.ofFloat(mBlurImage, "scaleY", mZoomRatio, 1f));
    else
        set.playTogether(ObjectAnimator.ofFloat(mBlurImage, "alpha", 1f, 0f));
    set.addListener(mGlobalListener);
    set.addListener(mGlobalDisappearAnimators);
    set.setDuration(mBlurDuration);
    set.start();
}
Also used : AnimatorSet(com.nineoldandroids.animation.AnimatorSet)

Example 2 with AnimatorSet

use of com.nineoldandroids.animation.AnimatorSet in project Meizhi by drakeet.

the class VideoImageView method nextAnimation.

private void nextAnimation() {
    AnimatorSet anim = new AnimatorSet();
    if (scale) {
        anim.playTogether(ObjectAnimator.ofFloat(this, "scaleX", 1.5f, 1f), ObjectAnimator.ofFloat(this, "scaleY", 1.5f, 1f));
    } else {
        anim.playTogether(ObjectAnimator.ofFloat(this, "scaleX", 1, 1.5f), ObjectAnimator.ofFloat(this, "scaleY", 1, 1.5f));
    }
    anim.setDuration(10987);
    anim.addListener(this);
    anim.start();
    scale = !scale;
}
Also used : AnimatorSet(com.nineoldandroids.animation.AnimatorSet)

Example 3 with AnimatorSet

use of com.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.

the class SwitchAnimationUtil method runFlipVertialAnimation.

private void runFlipVertialAnimation(View view, long delay) {
    view.setAlpha(0);
    AnimatorSet set = new AnimatorSet();
    ObjectAnimator objectAnimator1 = ObjectAnimator.ofFloat(view, "rotationX", -180f, 0f);
    ObjectAnimator objectAnimator2 = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f);
    set.setDuration(mDuration);
    set.playTogether(objectAnimator1, objectAnimator2);
    set.setStartDelay(delay);
    set.start();
}
Also used : ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator) AnimatorSet(com.nineoldandroids.animation.AnimatorSet)

Example 4 with AnimatorSet

use of com.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.

the class SwitchAnimationUtil method runRotateAnimation.

private void runRotateAnimation(View view, long delay) {
    view.setAlpha(0);
    AnimatorSet set = new AnimatorSet();
    ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "rotation", 0f, 360f);
    ObjectAnimator objectAnimator2 = ObjectAnimator.ofFloat(view, "scaleX", 0f, 1f);
    ObjectAnimator objectAnimator3 = ObjectAnimator.ofFloat(view, "scaleY", 0f, 1f);
    ObjectAnimator objectAnimator4 = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f);
    objectAnimator2.setInterpolator(new AccelerateInterpolator(1.0f));
    objectAnimator3.setInterpolator(new AccelerateInterpolator(1.0f));
    set.setDuration(mDuration);
    set.playTogether(objectAnimator, objectAnimator2, objectAnimator3, objectAnimator4);
    set.setStartDelay(delay);
    set.start();
}
Also used : AccelerateInterpolator(android.view.animation.AccelerateInterpolator) ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator) AnimatorSet(com.nineoldandroids.animation.AnimatorSet)

Example 5 with AnimatorSet

use of com.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.

the class SwitchAnimationUtil method runHorizonRightAnimation.

private void runHorizonRightAnimation(View view, long delay) {
    view.setAlpha(0);
    ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "translationX", ViewUtils.getScreenWidth(), 0);
    objectAnimator.setInterpolator(new LinearInterpolator());
    ObjectAnimator objectAnimatorAlpha = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f);
    AnimatorSet set = new AnimatorSet();
    set.setStartDelay(delay);
    set.setDuration(mDuration);
    set.playTogether(objectAnimator, objectAnimatorAlpha);
    set.start();
}
Also used : LinearInterpolator(android.view.animation.LinearInterpolator) ObjectAnimator(com.nineoldandroids.animation.ObjectAnimator) AnimatorSet(com.nineoldandroids.animation.AnimatorSet)

Aggregations

AnimatorSet (com.nineoldandroids.animation.AnimatorSet)57 ObjectAnimator (com.nineoldandroids.animation.ObjectAnimator)42 Animator (com.nineoldandroids.animation.Animator)24 AnimatorListenerAdapter (com.nineoldandroids.animation.AnimatorListenerAdapter)11 View (android.view.View)6 AccelerateInterpolator (android.view.animation.AccelerateInterpolator)4 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)4 SuppressLint (android.annotation.SuppressLint)3 Paint (android.graphics.Paint)3 OvershootInterpolator (android.view.animation.OvershootInterpolator)3 Point (android.graphics.Point)2 DisplayMetrics (android.util.DisplayMetrics)2 LinearInterpolator (android.view.animation.LinearInterpolator)2 AdapterView (android.widget.AdapterView)2 ImageView (android.widget.ImageView)2 TextView (android.widget.TextView)2 ValueAnimator (com.nineoldandroids.animation.ValueAnimator)2 IDetailView (com.yydcdut.note.views.note.IDetailView)2 FontTextView (com.yydcdut.note.widget.FontTextView)2 RevealView (com.yydcdut.note.widget.RevealView)2