Package com.zopim.android.sdk.anim
Class AnimatorPack
- java.lang.Object
-
- com.zopim.android.sdk.anim.AnimatorPack
-
public class AnimatorPack extends java.lang.ObjectProvides useful animator packs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classAnimatorPack.Direction
-
Constructor Summary
Constructors Constructor and Description AnimatorPack()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static AnimatorSetcrossfade(View out, View in)Switch views with fade and scale in place animation.static AnimatorSetcrossfade(View out, View in, Animator.AnimatorListener outListener, Animator.AnimatorListener inListener)Switch views with fade and scale in place animation.static AnimatorfadeIn(View toAnimate)Animation to fade in and scale up a view and make it visible.static AnimatorfadeOut(View toAnimate)Animation to fade out and scale down a view and make it invisible.static AnimatorSetscale(View view, float from, float to)Scales view in place It's up to you to set view's visibility on animation endstatic AnimatorslideIn(View toAnimate, AnimatorPack.Direction from)Builds a slide in animatorstatic AnimatorslideInSequentially(AnimatorPack.Direction from, long delay, boolean fadeIn, boolean scale, View... toAnimate)Slide in animation that delays start of each animated element by an offset.static AnimatorslideOut(View toAnimate, AnimatorPack.Direction to)Builds a slide out animator.static AnimatorslideOutSequentially(AnimatorPack.Direction to, long delay, boolean fadeOut, boolean scale, View... toAnimate)Slide out animation that delays start of each animated element by an offset.
-
-
-
Method Detail
-
scale
public static AnimatorSet scale(View view, float from, float to)Scales view in place It's up to you to set view's visibility on animation end- Parameters:
view- to be scaledfrom- starting scaleto- ending scale- Returns:
- scale animator
-
crossfade
public static AnimatorSet crossfade(View out, View in, Animator.AnimatorListener outListener, Animator.AnimatorListener inListener)Switch views with fade and scale in place animation.- Parameters:
out- view to hidein- view to showoutListener- that listens for fade-out animatorinListener- that listens for fade-in animator- Returns:
- crossfade animator
-
crossfade
public static AnimatorSet crossfade(View out, View in)Switch views with fade and scale in place animation.- Parameters:
out- view to hidein- view to show- Returns:
- crossfade animator
-
slideOut
public static Animator slideOut(View toAnimate, AnimatorPack.Direction to)Builds a slide out animator.- Parameters:
toAnimate- view to animateto- direction to slide out- Returns:
- slide out animator
-
slideIn
public static Animator slideIn(View toAnimate, AnimatorPack.Direction from)Builds a slide in animator- Parameters:
toAnimate- view to animatefrom- direction to slide in from- Returns:
- slide in animator
-
slideOutSequentially
public static Animator slideOutSequentially(AnimatorPack.Direction to, long delay, boolean fadeOut, boolean scale, View... toAnimate)
Slide out animation that delays start of each animated element by an offset.- Parameters:
to- direction to slide out todelay- durationfadeOut- true if fading outscale- true if scalingtoAnimate- view to animate- Returns:
- slide out animator
-
slideInSequentially
public static Animator slideInSequentially(AnimatorPack.Direction from, long delay, boolean fadeIn, boolean scale, View... toAnimate)
Slide in animation that delays start of each animated element by an offset.- Parameters:
from- direction to slide in fromdelay- durationfadeIn- true if fading inscale- true if scalingtoAnimate- view to animate- Returns:
- slide in animator
-
fadeOut
public static Animator fadeOut(View toAnimate)
Animation to fade out and scale down a view and make it invisible.- Parameters:
toAnimate- view to animate- Returns:
- animator that performs animation
-
fadeIn
public static Animator fadeIn(View toAnimate)
Animation to fade in and scale up a view and make it visible.- Parameters:
toAnimate- view to animate- Returns:
- animator that performs animation
-
-