Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/view/animation/AnimationUtils#pubctors) \| [Methods](https://developer.android.com/reference/android/view/animation/AnimationUtils#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/animation/AnimationUtils#inhmethods)

# AnimationUtils

*** ** * ** ***

` public class AnimationUtils `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.animation.AnimationUtils |

<br />

*** ** * ** ***

Defines common utilities for working with animations.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/animation/AnimationUtils#AnimationUtils()() ` |

| ### Public methods ||
|---|---|
| ` static long` | ` https://developer.android.com/reference/android/view/animation/AnimationUtils#currentAnimationTimeMillis()() ` Returns the current animation time in milliseconds. |
| ` static https://developer.android.com/reference/android/view/animation/Animation` | ` https://developer.android.com/reference/android/view/animation/AnimationUtils#loadAnimation(android.content.Context,%20int)(https://developer.android.com/reference/android/content/Context context, int id) ` Loads an `https://developer.android.com/reference/android/view/animation/Animation` object from a resource |
| ` static https://developer.android.com/reference/android/view/animation/Interpolator` | ` https://developer.android.com/reference/android/view/animation/AnimationUtils#loadInterpolator(android.content.Context,%20int)(https://developer.android.com/reference/android/content/Context context, int id) ` Loads an `https://developer.android.com/reference/android/view/animation/Interpolator` object from a resource |
| ` static https://developer.android.com/reference/android/view/animation/LayoutAnimationController` | ` https://developer.android.com/reference/android/view/animation/AnimationUtils#loadLayoutAnimation(android.content.Context,%20int)(https://developer.android.com/reference/android/content/Context context, int id) ` Loads a `https://developer.android.com/reference/android/view/animation/LayoutAnimationController` object from a resource |
| ` static https://developer.android.com/reference/android/view/animation/Animation` | ` https://developer.android.com/reference/android/view/animation/AnimationUtils#makeInAnimation(android.content.Context,%20boolean)(https://developer.android.com/reference/android/content/Context c, boolean fromLeft) ` Make an animation for objects becoming visible. |
| ` static https://developer.android.com/reference/android/view/animation/Animation` | ` https://developer.android.com/reference/android/view/animation/AnimationUtils#makeInChildBottomAnimation(android.content.Context)(https://developer.android.com/reference/android/content/Context c) ` Make an animation for objects becoming visible. |
| ` static https://developer.android.com/reference/android/view/animation/Animation` | ` https://developer.android.com/reference/android/view/animation/AnimationUtils#makeOutAnimation(android.content.Context,%20boolean)(https://developer.android.com/reference/android/content/Context c, boolean toRight) ` Make an animation for objects becoming invisible. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### AnimationUtils

```
public AnimationUtils ()
```

<br />

<br />

## Public methods

### currentAnimationTimeMillis

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static long currentAnimationTimeMillis ()
```

Returns the current animation time in milliseconds. This time should be used when invoking `https://developer.android.com/reference/android/view/animation/Animation#setStartTime(long)`. Refer to `https://developer.android.com/reference/android/os/SystemClock` for more information about the different available clocks. The clock used by this method is *not* the "wall" clock (it is not `https://developer.android.com/reference/java/lang/System#currentTimeMillis()`).

Do not use this method for animation progress or with `https://developer.android.com/reference/android/animation/Animator`. Using this timestamp for animations will introduce undersirable animation skips after missed frames. Use `https://developer.android.com/` instead.

<br />

<br />

| Returns ||
|---|---|
| `long` | the current animation time in milliseconds <br /> |

**See also:**

- `https://developer.android.com/reference/android/os/SystemClock`

### loadAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Animation loadAnimation (Context context, 
                int id)
```

Loads an `https://developer.android.com/reference/android/view/animation/Animation` object from a resource

<br />

| Parameters ||
|---|---|
| `context` | `Context`: Application context used to access resources <br /> |
| `id` | `int`: The resource id of the animation to load <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/animation/Animation` | The animation object referenced by the specified id <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/content/res/Resources.NotFoundException` | when the animation cannot be loaded |

### loadInterpolator

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Interpolator loadInterpolator (Context context, 
                int id)
```

Loads an `https://developer.android.com/reference/android/view/animation/Interpolator` object from a resource

<br />

| Parameters ||
|---|---|
| `context` | `Context`: Application context used to access resources <br /> |
| `id` | `int`: The resource id of the animation to load <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/animation/Interpolator` | The interpolator object referenced by the specified id <br /> |

| Throws ||
|---|---|
|   | android.content.res.Resources.NotFoundException |
| `https://developer.android.com/reference/android/content/res/Resources.NotFoundException` |   |

### loadLayoutAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static LayoutAnimationController loadLayoutAnimation (Context context, 
                int id)
```

Loads a `https://developer.android.com/reference/android/view/animation/LayoutAnimationController` object from a resource

<br />

| Parameters ||
|---|---|
| `context` | `Context`: Application context used to access resources <br /> |
| `id` | `int`: The resource id of the animation to load <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/animation/LayoutAnimationController` | The animation controller object referenced by the specified id <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/content/res/Resources.NotFoundException` | when the layout animation controller cannot be loaded |

### makeInAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Animation makeInAnimation (Context c, 
                boolean fromLeft)
```

Make an animation for objects becoming visible. Uses a slide and fade effect.

<br />

| Parameters ||
|---|---|
| `c` | `Context`: Context for loading resources <br /> |
| `fromLeft` | `boolean`: is the object to be animated coming from the left <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/animation/Animation` | The new animation <br /> |

### makeInChildBottomAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Animation makeInChildBottomAnimation (Context c)
```

Make an animation for objects becoming visible. Uses a slide up and fade effect.

<br />

| Parameters ||
|---|---|
| `c` | `Context`: Context for loading resources <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/animation/Animation` | The new animation <br /> |

### makeOutAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Animation makeOutAnimation (Context c, 
                boolean toRight)
```

Make an animation for objects becoming invisible. Uses a slide and fade effect.

<br />

| Parameters ||
|---|---|
| `c` | `Context`: Context for loading resources <br /> |
| `toRight` | `boolean`: is the object to be animated exiting to the right <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/animation/Animation` | The new animation <br /> |