public class AnimatorPack extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AnimatorPack.Direction |
Constructor and Description |
---|
AnimatorPack() |
Modifier and Type | Method and Description |
---|---|
static AnimatorSet |
crossfade(View out,
View in)
Switch views with fade and scale in place animation.
|
static AnimatorSet |
crossfade(View out,
View in,
Animator.AnimatorListener outListener,
Animator.AnimatorListener inListener)
Switch views with fade and scale in place animation.
|
static Animator |
fadeIn(View toAnimate)
Animation to fade in and scale up a view and make it visible.
|
static Animator |
fadeOut(View toAnimate)
Animation to fade out and scale down a view and make it invisible.
|
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
|
static Animator |
slideIn(View toAnimate,
AnimatorPack.Direction from)
Builds a slide in animator
|
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.
|
static Animator |
slideOut(View toAnimate,
AnimatorPack.Direction to)
Builds a slide out animator.
|
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.
|
public static AnimatorSet scale(View view, float from, float to)
view
- to be scaledfrom
- starting scaleto
- ending scalepublic static AnimatorSet crossfade(View out, View in, Animator.AnimatorListener outListener, Animator.AnimatorListener inListener)
out
- view to hidein
- view to showoutListener
- that listens for fade-out animatorinListener
- that listens for fade-in animatorpublic static AnimatorSet crossfade(View out, View in)
out
- view to hidein
- view to showpublic static Animator slideOut(View toAnimate, AnimatorPack.Direction to)
toAnimate
- view to animateto
- direction to slide outpublic static Animator slideIn(View toAnimate, AnimatorPack.Direction from)
toAnimate
- view to animatefrom
- direction to slide in frompublic static Animator slideOutSequentially(AnimatorPack.Direction to, long delay, boolean fadeOut, boolean scale, View... toAnimate)
to
- direction to slide out todelay
- durationfadeOut
- true if fading outscale
- true if scalingtoAnimate
- view to animatepublic static Animator slideInSequentially(AnimatorPack.Direction from, long delay, boolean fadeIn, boolean scale, View... toAnimate)
from
- direction to slide in fromdelay
- durationfadeIn
- true if fading inscale
- true if scalingtoAnimate
- view to animatepublic static Animator fadeOut(View toAnimate)
toAnimate
- view to animate