onCreateAnimator

@Nullable
open fun onCreateAnimator(transit: Int, enter: Boolean, nextAnim: Int): @Nullable Animator

Called when a fragment loads an animator. This will be called when onCreateAnimation returns null. Note that if setCustomAnimations was called with Animation resources instead of Animator resources, nextAnim will be an animation resource.

Parameters

transit

The value set in setTransition or 0 if not set.

enter

true when the fragment is added/attached/shown or false when the fragment is removed/detached/hidden.

nextAnim

The resource set in setCustomAnimations, setCustomAnimations, or 0 if neither was called. The value will depend on the current operation.


@Nullable
open fun onCreateAnimator(nextAnim: Int, enter: Boolean, isPop: Boolean): @Nullable Animator

Creates an animator for SESL fragment transitions, accounting for predictive back and pop-over window states.

Return

the created Animator, or null if default handling should be used

Parameters

nextAnim

animation resource ID

enter

true if fragment is entering

isPop

true if transition is a back stack pop