# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Ctors | Methods | Inherited Methods

# WindowInsetsAnimation

`public final class WindowInsetsAnimation`
`extends Object` ``

java.lang.Object
↳ | android.view.WindowInsetsAnimation

Class representing an animation of a set of windows that cause insets.

## Summary

### Nested classes
`class` | `WindowInsetsAnimation.Bounds` Class representing the range of an `WindowInsetsAnimation`
`class` | `WindowInsetsAnimation.Callback` Interface that allows the application to listen to animation events for windows that cause insets.

### Public constructors
`WindowInsetsAnimation(int typeMask, Interpolator interpolator, long durationMillis)` Creates a new `WindowInsetsAnimation` object.

### Public methods
`float` | `getAlpha()` Retrieves the translucency of the windows that are animating.
`long` | `getDurationMillis()`
`float` | `getFraction()` Returns the raw fractional progress of this animation between start state of the animation and the end state of the animation.
`float` | `getInterpolatedFraction()` Returns the interpolated fractional progress of this animation between start state of the animation and the end state of the animation.
`Interpolator` | `getInterpolator()` Retrieves the interpolator used for this animation, or `null` if this animation doesn't follow an interpolation curved.
`int` | `getTypeMask()`
`void` | `setAlpha(float alpha)` Sets the translucency of the windows that are animating.
`void` | `setFraction(float fraction)` Set fraction of the progress if `WindowInsets.Type.InsetsType` animation is controlled by the app.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### WindowInsetsAnimation

    public WindowInsetsAnimation (int typeMask,
                    Interpolator interpolator,
                    long durationMillis)

Creates a new `WindowInsetsAnimation` object.

This should only be used for testing, as usually the system creates this object for the application to listen to with `Callback`.

Parameters
`typeMask` | `int`: The bitmask of `WindowInsets.Type`s that are animating. Value is either `0` or a combination of android.view.WindowInsets.Type.STATUS_BARS, android.view.WindowInsets.Type.NAVIGATION_BARS, android.view.WindowInsets.Type.CAPTION_BAR, android.view.WindowInsets.Type.IME, android.view.WindowInsets.Type.WINDOW_DECOR, android.view.WindowInsets.Type.SYSTEM_GESTURES, android.view.WindowInsets.Type.MANDATORY_SYSTEM_GESTURES, android.view.WindowInsets.Type.TAPPABLE_ELEMENT, and android.view.WindowInsets.Type.DISPLAY_CUTOUT
`interpolator` | `Interpolator`: The interpolator of the animation. This value may be `null`.
`durationMillis` | `long`: The duration of the animation in `TimeUnit.MILLISECONDS`.

## Public methods

### getAlpha

    public float getAlpha ()

Retrieves the translucency of the windows that are animating.

Returns
`float` | Alpha of windows that cause insets of type `WindowInsets.Type.InsetsType`. Value is between 0f and 1f inclusive

### getDurationMillis

    public long getDurationMillis ()

Returns
`long` | duration of animation in `TimeUnit.MILLISECONDS`, or -1 if the animation doesn't have a fixed duration.

### getFraction

    public float getFraction ()

Returns the raw fractional progress of this animation between start state of the animation and the end state of the animation. Note that this progress is the global progress of the animation, whereas `Callback#onProgress` will only dispatch the insets that may be inset with `WindowInsets#inset` by parents of views in the hierarchy. Progress per insets animation is global for the entire animation. One animation animates all things together (in, out, ...). If they don't animate together, we'd have multiple animations.

Note: In case the application is controlling the animation, the valued returned here will be the same as the application passed into `WindowInsetsAnimationController#setInsetsAndAlpha(Insets, float, float)`.

Returns
`float` | The current progress of this animation. Value is between 0f and 1f inclusive

### getInterpolatedFraction

    public float getInterpolatedFraction ()

Returns the interpolated fractional progress of this animation between start state of the animation and the end state of the animation. Note that this progress is the global progress of the animation, whereas `Callback#onProgress` will only dispatch the insets that may be inset with `WindowInsets#inset` by parents of views in the hierarchy. Progress per insets animation is global for the entire animation. One animation animates all things together (in, out, ...). If they don't animate together, we'd have multiple animations.

Note: In case the application is controlling the animation, the valued returned here will be the same as the application passed into `WindowInsetsAnimationController#setInsetsAndAlpha(Insets, float, float)`, interpolated with the interpolator passed into `WindowInsetsController#controlWindowInsetsAnimation`.

Note: For system-initiated animations, this will always return a valid value between 0 and 1.

Returns
`float` | The current interpolated progress of this animation.

See also:

- `for raw fraction.`

### getInterpolator

    public Interpolator getInterpolator ()

Retrieves the interpolator used for this animation, or `null` if this animation doesn't follow an interpolation curved. For system-initiated animations, this will never return `null`.

Returns
`Interpolator` | The interpolator used for this animation.

### getTypeMask

    public int getTypeMask ()

Returns
`int` | The bitmask of `WindowInsets.Type.InsetsType`s that are animating. Value is either `0` or a combination of android.view.WindowInsets.Type.STATUS_BARS, android.view.WindowInsets.Type.NAVIGATION_BARS, android.view.WindowInsets.Type.CAPTION_BAR, android.view.WindowInsets.Type.IME, android.view.WindowInsets.Type.WINDOW_DECOR, android.view.WindowInsets.Type.SYSTEM_GESTURES, android.view.WindowInsets.Type.MANDATORY_SYSTEM_GESTURES, android.view.WindowInsets.Type.TAPPABLE_ELEMENT, and android.view.WindowInsets.Type.DISPLAY_CUTOUT

### setAlpha

    public void setAlpha (float alpha)

Sets the translucency of the windows that are animating.

Note: This should only be used for testing, as the system fills in the alpha for the application or the alpha that was passed into `WindowInsetsAnimationController#setInsetsAndAlpha(Insets, float, float)` is being used.

Parameters
`alpha` | `float`: Alpha of windows that cause insets of type `WindowInsets.Type.InsetsType`. Value is between 0f and 1f inclusive

See also:

- `getAlpha()`

### setFraction

    public void setFraction (float fraction)

Set fraction of the progress if `WindowInsets.Type.InsetsType` animation is controlled by the app.

Note: This should only be used for testing, as the system fills in the fraction for the application or the fraction that was passed into `WindowInsetsAnimationController#setInsetsAndAlpha(Insets, float, float)` is being used.

Parameters
`fraction` | `float`: fractional progress between 0 and 1 where 0 represents hidden and zero progress and 1 represent fully shown final state. Value is between 0f and 1f inclusive

See also:

- `getFraction()`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*