Unit |
dump(@NonNull prefix: String, @Nullable fd: FileDescriptor?, @NonNull writer: PrintWriter, @Nullable args: Array<String!>?)
Print the Fragments's state into the given stream.
|
Boolean |
equals(@Nullable other: Any?)
Subclasses can not override equals().
|
FragmentActivity? |
getActivity()
Return the FragmentActivity this fragment is currently associated with. May return null if the fragment is associated with a Context instead.
|
Boolean |
getAllowEnterTransitionOverlap()
Returns whether the the exit transition and enter transition overlap or not. When true, the enter transition will start as soon as possible. When false, the enter transition will wait until the exit transition completes before starting.
|
Boolean |
getAllowReturnTransitionOverlap()
Returns whether the the return transition and reenter transition overlap or not. When true, the reenter transition will start as soon as possible. When false, the reenter transition will wait until the return transition completes before starting.
|
Bundle? |
getArguments()
Return the arguments supplied when the fragment was instantiated, if any.
|
FragmentManager |
getChildFragmentManager()
Return a private FragmentManager for placing and managing Fragments inside of this Fragment.
|
Context? |
getContext()
Return the Context this fragment is currently associated with.
|
ViewModelProvider.Factory |
getDefaultViewModelProviderFactory()
Returns the default ViewModelProvider.Factory that should be used when no custom Factory is provided to the ViewModelProvider constructors.
The Fragment's arguments when this is first called will be used as the defaults to any androidx.lifecycle.SavedStateHandle passed to a view model created using this factory.
|
Any? |
getEnterTransition()
Returns the Transition that will be used to move Views into the initial scene. The entering Views will be those that are regular Views or ViewGroups that have ViewGroup#isTransitionGroup return true. Typical Transitions will extend android.transition.Visibility as entering is governed by changing visibility from View#INVISIBLE to View#VISIBLE .
|
Any? |
getExitTransition()
Returns the Transition that will be used to move Views out of the scene when the fragment is removed, hidden, or detached when not popping the back stack. The exiting Views will be those that are regular Views or ViewGroups that have ViewGroup#isTransitionGroup return true. Typical Transitions will extend android.transition.Visibility as exiting is governed by changing visibility from View#VISIBLE to View#INVISIBLE . If transition is null, the views will remain unaffected.
|
FragmentManager? |
getFragmentManager()
Return the FragmentManager for interacting with fragments associated with this fragment's activity. Note that this will be non-null slightly before getActivity() , during the time from when the fragment is placed in a FragmentTransaction until it is committed and attached to its activity.
If this Fragment is a child of another Fragment, the FragmentManager returned here will be the parent's getChildFragmentManager() .
|
Any? |
getHost()
Return the host object of this fragment. May return null if the fragment isn't currently being hosted.
|
Int |
getId()
Return the identifier this fragment is known by. This is either the android:id value supplied in a layout or the container view ID supplied when adding the fragment.
|
LayoutInflater |
getLayoutInflater()
Returns the cached LayoutInflater used to inflate Views of this Fragment. If onGetLayoutInflater(Bundle) has not been called onGetLayoutInflater(Bundle) will be called with a null argument and that value will be cached.
The cached LayoutInflater will be replaced immediately prior to onCreateView(LayoutInflater, ViewGroup, Bundle) and cleared immediately after onDetach() .
|
Lifecycle |
getLifecycle()
Returns the Lifecycle of the provider.
Overriding this method is no longer supported and this method will be made final in a future version of Fragment.
|
LoaderManager |
getLoaderManager()
Return the LoaderManager for this fragment.
|
Fragment? |
getParentFragment()
Returns the parent Fragment containing this Fragment. If this Fragment is attached directly to an Activity, returns null.
|
FragmentManager |
getParentFragmentManager()
Return the FragmentManager for interacting with fragments associated with this fragment's activity. Note that this will be available slightly before getActivity() , during the time from when the fragment is placed in a FragmentTransaction until it is committed and attached to its activity.
If this Fragment is a child of another Fragment, the FragmentManager returned here will be the parent's getChildFragmentManager() .
|
Any? |
getReenterTransition()
Returns the Transition that will be used to move Views in to the scene when returning due to popping a back stack. The entering Views will be those that are regular Views or ViewGroups that have ViewGroup#isTransitionGroup return true. Typical Transitions will extend android.transition.Visibility as exiting is governed by changing visibility from View#VISIBLE to View#INVISIBLE . If nothing is set, the default will be to use the same transition as getExitTransition() .
|
Resources |
getResources()
Return requireActivity().getResources() .
|
Boolean |
getRetainInstance()
Returns true if this fragment instance's state will be retained across configuration changes, and false if it will not.
|
Any? |
getReturnTransition()
Returns the Transition that will be used to move Views out of the scene when the Fragment is preparing to be removed, hidden, or detached because of popping the back stack. The exiting Views will be those that are regular Views or ViewGroups that have ViewGroup#isTransitionGroup return true. Typical Transitions will extend android.transition.Visibility as entering is governed by changing visibility from View#VISIBLE to View#INVISIBLE . If nothing is set, the default will be to use the same transition as getEnterTransition() .
|
SavedStateRegistry |
getSavedStateRegistry()
|
Any? |
getSharedElementEnterTransition()
Returns the Transition that will be used for shared elements transferred into the content Scene. Typical Transitions will affect size and location, such as android.transition.ChangeBounds . A null value will cause transferred shared elements to blink to the final position.
|
Any? |
getSharedElementReturnTransition()
Return the Transition that will be used for shared elements transferred back during a pop of the back stack. This Transition acts in the leaving Fragment. Typical Transitions will affect size and location, such as android.transition.ChangeBounds . A null value will cause transferred shared elements to blink to the final position. If no value is set, the default will be to use the same value as setSharedElementEnterTransition(Object) .
|
String |
getString(@StringRes resId: Int)
Return a localized string from the application's package's default string table.
|
String |
getString(@StringRes resId: Int, @Nullable vararg formatArgs: Any!)
Return a localized formatted string from the application's package's default string table, substituting the format arguments as defined in java.util.Formatter and java.lang.String#format.
|
String? |
getTag()
Get the tag name of the fragment, if specified.
|