public class AnimationUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
AnimationUtils.AnimateToTransparentListener |
static class |
AnimationUtils.AnimationListenerAdapter
This adapter class provides empty implementations of the methods from
Animation.AnimationListener. |
static class |
AnimationUtils.OnAnimationEnd |
static class |
AnimationUtils.OnAnimationLoop |
static class |
AnimationUtils.OnAnimationStart |
static class |
AnimationUtils.OnTransitionStart |
| Modifier and Type | Field and Description |
|---|---|
static float |
ANIMATION_PLAY_SPEED |
static float |
ANIMATION_REVERSE_PLAY_SPEED |
| Constructor and Description |
|---|
AnimationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
animateAlpha(android.view.View view,
float startAlpha,
float targetAlpha,
long duration) |
static void |
animateAlpha(android.view.View view,
float startAlpha,
float targetAlpha,
long duration,
android.animation.Animator.AnimatorListener animatorListener) |
static java.lang.Runnable |
animateFromJson(com.airbnb.lottie.LottieAnimationView view,
java.lang.String jsonFileName)
Animates a view using a json animation file immediately.
|
static java.lang.Runnable |
animateFromJson(com.airbnb.lottie.LottieAnimationView view,
java.lang.String jsonFileName,
boolean reversed)
Animates a view using a json animation file immediately.
|
static java.lang.Runnable |
animateFromJson(com.airbnb.lottie.LottieAnimationView view,
java.lang.String jsonFileName,
long delay)
Animates a view using a json animation file after a certain delay.
|
static java.lang.Runnable |
animateFromJson(com.airbnb.lottie.LottieAnimationView view,
java.lang.String jsonFileName,
long delay,
boolean reversed)
Animates a view using a json animation file.
|
static void |
animateTextSize(android.widget.TextView view,
int startTextSize,
int targetTextSize,
long duration) |
static void |
animateToTransparent(android.view.View view,
long duration,
int endVisibilityState)
Animates the view from an opaque state to a transparent state and then sets it's visibility
to the specified state.
|
static void |
animateToTransparent(android.view.View view,
long duration,
int endVisibilityState,
AnimationUtils.AnimateToTransparentListener onAnimationEndCallback)
Animates the view from an opaque state to a transparent state and then sets it's visibility
to the specified state.
|
static boolean |
areSystemAnimationsEnabled(android.content.Context context)
Gets a value indicating whether system animations are enabled or not.
|
public static final float ANIMATION_PLAY_SPEED
public static final float ANIMATION_REVERSE_PLAY_SPEED
public static void animateAlpha(android.view.View view,
float startAlpha,
float targetAlpha,
long duration)
public static void animateAlpha(android.view.View view,
float startAlpha,
float targetAlpha,
long duration,
android.animation.Animator.AnimatorListener animatorListener)
public static java.lang.Runnable animateFromJson(com.airbnb.lottie.LottieAnimationView view,
java.lang.String jsonFileName)
view - to animatejsonFileName - animationpublic static java.lang.Runnable animateFromJson(com.airbnb.lottie.LottieAnimationView view,
java.lang.String jsonFileName,
long delay)
view - to animatejsonFileName - animationdelay - ms before starting animationpublic static java.lang.Runnable animateFromJson(com.airbnb.lottie.LottieAnimationView view,
java.lang.String jsonFileName,
boolean reversed)
view - to animatejsonFileName - animationreversed - true if the animation should be reversed, false otherwisepublic static java.lang.Runnable animateFromJson(com.airbnb.lottie.LottieAnimationView view,
java.lang.String jsonFileName,
long delay,
boolean reversed)
view - to animatejsonFileName - animationdelay - ms before starting animationreversed - true if the animation should be reversed, false otherwisepublic static void animateTextSize(android.widget.TextView view,
int startTextSize,
int targetTextSize,
long duration)
public static void animateToTransparent(@NonNull
android.view.View view,
long duration,
int endVisibilityState)
view - The view that will become transparent.duration - The duration of the animation.endVisibilityState - The visibility state that the view will be set to after the
animation.public static void animateToTransparent(@NonNull
android.view.View view,
long duration,
int endVisibilityState,
@Nullable
AnimationUtils.AnimateToTransparentListener onAnimationEndCallback)
view - The view that will become transparent.duration - The duration of the animation.endVisibilityState - The visibility state that the view will be set to after the
animation.public static boolean areSystemAnimationsEnabled(@NonNull
android.content.Context context)
context - The current context.