FragmentManager.OnBackStackChangedListener

interface FragmentManager.OnBackStackChangedListener


Interface to watch for changes to the back stack.

Summary

Public functions

Unit

Called whenever a predictive back gesture is cancelled.

Unit

Called whenever the contents of a back stack change is committed.

Unit

Called whenever a predictive back gesture is changing the back stack.

Unit

Called whenever the contents of the back stack are starting to be changed, before fragments being to move to their target states.

Unit

Called whenever the contents of the back stack change.

Public functions

onBackStackChangeCancelled

Added in 1.7.0-alpha10
@MainThread
fun onBackStackChangeCancelled(): Unit

Called whenever a predictive back gesture is cancelled.

onBackStackChangeCommitted

Added in 1.6.0
@MainThread
fun onBackStackChangeCommitted(fragment: Fragment, pop: Boolean): Unit

Called whenever the contents of a back stack change is committed.

Parameters
fragment: Fragment

that is affected by the committed back stack change

pop: Boolean

whether this back stack change is a pop

onBackStackChangeProgressed

Added in 1.7.0-alpha10
@MainThread
fun onBackStackChangeProgressed(backEventCompat: BackEventCompat): Unit

Called whenever a predictive back gesture is changing the back stack.

Parameters
backEventCompat: BackEventCompat

event that holds the current back gesture data

onBackStackChangeStarted

Added in 1.6.0
@MainThread
fun onBackStackChangeStarted(fragment: Fragment, pop: Boolean): Unit

Called whenever the contents of the back stack are starting to be changed, before fragments being to move to their target states.

Parameters
fragment: Fragment

that is affected by the starting back stack change

pop: Boolean

whether this back stack change is a pop

onBackStackChanged

Added in 1.1.0
@MainThread
fun onBackStackChanged(): Unit

Called whenever the contents of the back stack change.