FragmentLifecycleCallbacks
abstract classFragmentLifecycleCallbacks
kotlin.Any | |
↳ | android.app.FragmentManager.FragmentLifecycleCallbacks |
Callback interface for listening to fragment state changes that happen within a given FragmentManager.
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
open Unit |
onFragmentActivityCreated(fm: FragmentManager!, f: Fragment!, savedInstanceState: Bundle!) Called after the fragment has returned from the FragmentManager's call to |
open Unit |
onFragmentAttached(fm: FragmentManager!, f: Fragment!, context: Context!) Called after the fragment has been attached to its host. |
open Unit |
onFragmentCreated(fm: FragmentManager!, f: Fragment!, savedInstanceState: Bundle!) Called after the fragment has returned from the FragmentManager's call to |
open Unit |
onFragmentDestroyed(fm: FragmentManager!, f: Fragment!) Called after the fragment has returned from the FragmentManager's call to |
open Unit |
onFragmentDetached(fm: FragmentManager!, f: Fragment!) Called after the fragment has returned from the FragmentManager's call to |
open Unit |
onFragmentPaused(fm: FragmentManager!, f: Fragment!) Called after the fragment has returned from the FragmentManager's call to |
open Unit |
onFragmentPreAttached(fm: FragmentManager!, f: Fragment!, context: Context!) Called right before the fragment's |
open Unit |
onFragmentPreCreated(fm: FragmentManager!, f: Fragment!, savedInstanceState: Bundle!) Called right before the fragment's |
open Unit |
onFragmentResumed(fm: FragmentManager!, f: Fragment!) Called after the fragment has returned from the FragmentManager's call to |
open Unit |
onFragmentSaveInstanceState(fm: FragmentManager!, f: Fragment!, outState: Bundle!) Called after the fragment has returned from the FragmentManager's call to |
open Unit |
onFragmentStarted(fm: FragmentManager!, f: Fragment!) Called after the fragment has returned from the FragmentManager's call to |
open Unit |
onFragmentStopped(fm: FragmentManager!, f: Fragment!) Called after the fragment has returned from the FragmentManager's call to |
open Unit |
onFragmentViewCreated(fm: FragmentManager!, f: Fragment!, v: View!, savedInstanceState: Bundle!) Called after the fragment has returned a non-null view from the FragmentManager's request to |
open Unit |
onFragmentViewDestroyed(fm: FragmentManager!, f: Fragment!) Called after the fragment has returned from the FragmentManager's call to |
Public constructors
FragmentLifecycleCallbacks
FragmentLifecycleCallbacks()
Public methods
onFragmentActivityCreated
open funonFragmentActivityCreated(
fm: FragmentManager!,
f: Fragment!,
savedInstanceState: Bundle!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onActivityCreated(Bundle)
. This will only happen once for any given fragment instance, though the fragment may be attached and detached multiple times.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
savedInstanceState |
Bundle!: Saved instance bundle from a previous instance |
onFragmentAttached
open funonFragmentAttached(
fm: FragmentManager!,
f: Fragment!,
context: Context!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has been attached to its host. Its host will have had onAttachFragment
called before this call happens.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
context |
Context!: Context that the Fragment was attached to |
onFragmentCreated
open funonFragmentCreated(
fm: FragmentManager!,
f: Fragment!,
savedInstanceState: Bundle!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onCreate(Bundle)
. This will only happen once for any given fragment instance, though the fragment may be attached and detached multiple times.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
savedInstanceState |
Bundle!: Saved instance bundle from a previous instance |
onFragmentDestroyed
open funonFragmentDestroyed(
fm: FragmentManager!,
f: Fragment!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onDestroy()
.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
onFragmentDetached
open funonFragmentDetached(
fm: FragmentManager!,
f: Fragment!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onDetach()
.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
onFragmentPaused
open funonFragmentPaused(
fm: FragmentManager!,
f: Fragment!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onPause()
.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
onFragmentPreAttached
open funonFragmentPreAttached(
fm: FragmentManager!,
f: Fragment!,
context: Context!
): Unit
Deprecated: Deprecated in Java.
Called right before the fragment's Fragment#onAttach(Context)
method is called. This is a good time to inject any required dependencies for the fragment before any of the fragment's lifecycle methods are invoked.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
context |
Context!: Context that the Fragment is being attached to |
onFragmentPreCreated
open funonFragmentPreCreated(
fm: FragmentManager!,
f: Fragment!,
savedInstanceState: Bundle!
): Unit
Deprecated: Deprecated in Java.
Called right before the fragment's Fragment#onCreate(Bundle)
method is called. This is a good time to inject any required dependencies or perform other configuration for the fragment.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
savedInstanceState |
Bundle!: Saved instance bundle from a previous instance |
onFragmentResumed
open funonFragmentResumed(
fm: FragmentManager!,
f: Fragment!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onResume()
.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
onFragmentSaveInstanceState
open funonFragmentSaveInstanceState(
fm: FragmentManager!,
f: Fragment!,
outState: Bundle!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onSaveInstanceState(Bundle)
.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
outState |
Bundle!: Saved state bundle for the fragment |
onFragmentStarted
open funonFragmentStarted(
fm: FragmentManager!,
f: Fragment!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onStart()
.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
onFragmentStopped
open funonFragmentStopped(
fm: FragmentManager!,
f: Fragment!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onStop()
.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |
onFragmentViewCreated
open funonFragmentViewCreated(
fm: FragmentManager!,
f: Fragment!,
v: View!,
savedInstanceState: Bundle!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned a non-null view from the FragmentManager's request to Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle)
.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment that created and owns the view |
v |
View!: View returned by the fragment |
savedInstanceState |
Bundle!: Saved instance bundle from a previous instance |
onFragmentViewDestroyed
open funonFragmentViewDestroyed(
fm: FragmentManager!,
f: Fragment!
): Unit
Deprecated: Deprecated in Java.
Called after the fragment has returned from the FragmentManager's call to Fragment#onDestroyView()
.
Parameters | |
---|---|
fm |
FragmentManager!: Host FragmentManager |
f |
Fragment!: Fragment changing state |