Android 12 Developer Preview is here! Try it out, and give us your feedback!

FragmentLifecycleCallbacks

abstract class FragmentLifecycleCallbacks
kotlin.Any
   ↳ androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks

Callback interface for listening to fragment state changes that happen within a given FragmentManager.

Summary

Public constructors

Callback interface for listening to fragment state changes that happen within a given FragmentManager.

Public methods
open Unit
onFragmentActivityCreated(@NonNull fm: FragmentManager, @NonNull f: Fragment, @Nullable savedInstanceState: Bundle?)

Called after the fragment has returned from the FragmentManager's call to Fragment#onActivityCreated(Bundle).

open Unit
onFragmentAttached(@NonNull fm: FragmentManager, @NonNull f: Fragment, @NonNull context: Context)

Called after the fragment has been attached to its host.

open Unit
onFragmentCreated(@NonNull fm: FragmentManager, @NonNull f: Fragment, @Nullable savedInstanceState: Bundle?)

Called after the fragment has returned from the FragmentManager's call to Fragment#onCreate(Bundle).

open Unit
onFragmentDestroyed(@NonNull fm: FragmentManager, @NonNull f: Fragment)

Called after the fragment has returned from the FragmentManager's call to Fragment#onDestroy().

open Unit
onFragmentDetached(@NonNull fm: FragmentManager, @NonNull f: Fragment)

Called after the fragment has returned from the FragmentManager's call to Fragment#onDetach().

open Unit
onFragmentPaused(@NonNull fm: FragmentManager, @NonNull f: Fragment)

Called after the fragment has returned from the FragmentManager's call to Fragment#onPause().

open Unit
onFragmentPreAttached(@NonNull fm: FragmentManager, @NonNull f: Fragment, @NonNull context: Context)

Called right before the fragment's Fragment#onAttach(Context) method is called.

open Unit
onFragmentPreCreated(@NonNull fm: FragmentManager, @NonNull f: Fragment, @Nullable savedInstanceState: Bundle?)

Called right before the fragment's Fragment#onCreate(Bundle) method is called.

open Unit
onFragmentResumed(@NonNull fm: FragmentManager, @NonNull f: Fragment)

Called after the fragment has returned from the FragmentManager's call to Fragment#onResume().

open Unit
onFragmentSaveInstanceState(@NonNull fm: FragmentManager, @NonNull f: Fragment, @NonNull outState: Bundle)

Called after the fragment has returned from the FragmentManager's call to Fragment#onSaveInstanceState(Bundle).

open Unit
onFragmentStarted(@NonNull fm: FragmentManager, @NonNull f: Fragment)

Called after the fragment has returned from the FragmentManager's call to Fragment#onStart().

open Unit
onFragmentStopped(@NonNull fm: FragmentManager, @NonNull f: Fragment)

Called after the fragment has returned from the FragmentManager's call to Fragment#onStop().

open Unit
onFragmentViewCreated(@NonNull fm: