# FragmentAnimationProvider

# FragmentAnimationProvider

Artifact:[androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback)  
[View Source](https://cs.android.com/search?q=file:androidx/leanback/widget/FragmentAnimationProvider.java+class:androidx.leanback.widget.FragmentAnimationProvider)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/leanback/widget/FragmentAnimationProvider "View this page in Java")

<br />

```
interface FragmentAnimationProvider
```

<br />

Known direct subclasses  
[GuidanceStylist](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidanceStylist),[GuidedActionsStylist](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist)  

|----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [GuidanceStylist](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidanceStylist)           | GuidanceStylist is used within a[androidx.leanback.app.GuidedStepFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/GuidedStepFragment)to display contextual information for the decision(s) required at that step. |
| [GuidedActionsStylist](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist) | GuidedActionsStylist is used within a[androidx.leanback.app.GuidedStepFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/GuidedStepFragment)to supply the right-side panel where users can take actions.            |

*** ** * ** ***

FragmentAnimationProvider supplies animations for use during a fragment's onCreateAnimator callback. Animators added here will be added to an animation set and played together. This allows presenters used by a fragment to control their own fragment lifecycle animations.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onImeAppearing](https://developer.android.com/reference/kotlin/androidx/leanback/widget/FragmentAnimationProvider#onImeAppearing(java.util.List<android.animation.Animator>))`(animators: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Animator](https://developer.android.com/reference/android/animation/Animator.html)`!>)` Animates the fragment in response to the IME appearing.          |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onImeDisappearing](https://developer.android.com/reference/kotlin/androidx/leanback/widget/FragmentAnimationProvider#onImeDisappearing(java.util.List<android.animation.Animator>))`(animators: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Animator](https://developer.android.com/reference/android/animation/Animator.html)`!>)` Animates the fragment in response to the IME disappearing. |

## Public functions

### onImeAppearing

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)  

```
fun onImeAppearing(animators: (Mutable)List<Animator!>): Unit
```

Animates the fragment in response to the IME appearing.  

|                                                                                                                                                Parameters                                                                                                                                                |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| `animators: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Animator](https://developer.android.com/reference/android/animation/Animator.html)`!>` | A list of animations to which this provider's animations should be added. |

### onImeDisappearing

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)  

```
fun onImeDisappearing(animators: (Mutable)List<Animator!>): Unit
```

Animates the fragment in response to the IME disappearing.  

|                                                                                                                                                Parameters                                                                                                                                                |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| `animators: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Animator](https://developer.android.com/reference/android/animation/Animator.html)`!>` | A list of animations to which this provider's animations should be added. |