Search in sources :

Example 16 with AnticipateOvershootInterpolator

use of android.view.animation.AnticipateOvershootInterpolator in project smartmodule by carozhu.

the class AnimationController method setEffect.

private void setEffect(Animation animation, int interpolatorType, long durationMillis, long delayMillis) {
    switch(interpolatorType) {
        case 0:
            animation.setInterpolator(new LinearInterpolator());
            break;
        case 1:
            animation.setInterpolator(new AccelerateInterpolator());
            break;
        case 2:
            animation.setInterpolator(new DecelerateInterpolator());
            break;
        case 3:
            animation.setInterpolator(new AccelerateDecelerateInterpolator());
            break;
        case 4:
            animation.setInterpolator(new BounceInterpolator());
            break;
        case 5:
            animation.setInterpolator(new OvershootInterpolator());
            break;
        case 6:
            animation.setInterpolator(new AnticipateInterpolator());
            break;
        case 7:
            animation.setInterpolator(new AnticipateOvershootInterpolator());
            break;
        default:
            break;
    }
    animation.setDuration(durationMillis);
    animation.setStartOffset(delayMillis);
}
Also used : AccelerateDecelerateInterpolator(android.view.animation.AccelerateDecelerateInterpolator) DecelerateInterpolator(android.view.animation.DecelerateInterpolator) AccelerateInterpolator(android.view.animation.AccelerateInterpolator) AnticipateOvershootInterpolator(android.view.animation.AnticipateOvershootInterpolator) OvershootInterpolator(android.view.animation.OvershootInterpolator) LinearInterpolator(android.view.animation.LinearInterpolator) BounceInterpolator(android.view.animation.BounceInterpolator) AccelerateDecelerateInterpolator(android.view.animation.AccelerateDecelerateInterpolator) AnticipateOvershootInterpolator(android.view.animation.AnticipateOvershootInterpolator) AnticipateInterpolator(android.view.animation.AnticipateInterpolator)

Aggregations

AnticipateOvershootInterpolator (android.view.animation.AnticipateOvershootInterpolator)16 ObjectAnimator (android.animation.ObjectAnimator)10 AccelerateInterpolator (android.view.animation.AccelerateInterpolator)10 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)10 View (android.view.View)8 Animator (android.animation.Animator)7 ImageView (android.widget.ImageView)7 AnimatorSet (android.animation.AnimatorSet)5 Paint (android.graphics.Paint)5 Point (android.graphics.Point)5 ValueAnimator (android.animation.ValueAnimator)4 AccelerateDecelerateInterpolator (android.view.animation.AccelerateDecelerateInterpolator)4 AnticipateInterpolator (android.view.animation.AnticipateInterpolator)4 BounceInterpolator (android.view.animation.BounceInterpolator)4 LinearInterpolator (android.view.animation.LinearInterpolator)4 OvershootInterpolator (android.view.animation.OvershootInterpolator)4 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)2 ActivityNotFoundException (android.content.ActivityNotFoundException)1 Intent (android.content.Intent)1 Typeface (android.graphics.Typeface)1