@NonNull void |
Print the Fragments's state into the given stream.
|
final @NonNull boolean |
Subclasses can not override equals().
|
final @Nullable FragmentActivity |
Return the FragmentActivity this fragment is currently associated with.
|
@NonNull boolean |
Returns whether the the exit transition and enter transition overlap or not.
|
@NonNull boolean |
Returns whether the the return transition and reenter transition overlap or not.
|
final @Nullable Bundle |
Return the arguments supplied when the fragment was instantiated, if any.
|
final @NonNull FragmentManager |
Return a private FragmentManager for placing and managing Fragments inside of this Fragment.
|
@Nullable Context |
Return the Context this fragment is currently associated with.
|
@NonNull Factory |
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.
|
@Nullable Object |
Returns the Transition that will be used to move Views into the initial scene.
|
@Nullable Object |
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.
|
final @Nullable FragmentManager |
This method is deprecated.
This has been removed in favor of getParentFragmentManager() which throws an IllegalStateException if the FragmentManager is null.
|
final @Nullable Object |
Return the host object of this fragment.
|
final @NonNull int |
Return the identifier this fragment is known by.
|
final @NonNull LayoutInflater |
Returns the cached LayoutInflater used to inflate Views of this Fragment.
|
@NonNull Lifecycle |
Overriding this method is no longer supported and this method will be made final in a future version of Fragment.
|
@NonNull LoaderManager |
This method is deprecated.
Use LoaderManager.getInstance(this).
|
final @Nullable Fragment |
Returns the parent Fragment containing this Fragment.
|
final @NonNull FragmentManager |
Return the FragmentManager for interacting with fragments associated with this fragment's activity.
|
@Nullable Object |
Returns the Transition that will be used to move Views in to the scene when returning due to popping a back stack.
|
final @NonNull Resources |
Return requireActivity().getResources() .
|
final @NonNull boolean |
This method is deprecated.
Instead of retaining the Fragment itself, use a non-retained Fragment and keep retained state in a ViewModel attached to that Fragment.
|
@Nullable Object |
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.
|
final @NonNull SavedStateRegistry |
|
@Nullable Object |
Returns the Transition that will be used for shared elements transferred into the content Scene.
|
@Nullable Object |
Return the Transition that will be used for shared elements transferred back during a pop of the back stack.
|
final @NonNull String |
Return a localized string from the application's package's default string table.
|
final @NonNull String |
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 format.
|
final @Nullable String |
Get the tag name of the fragment, if specified.
|
final @Nullable Fragment |
This method is deprecated.
Instead of using a target fragment to pass results, use FragmentManager#setFragmentResult(String, Bundle) to deliver results to FragmentResultListener instances registered by other fragments via FragmentManager#setFragmentResultListener(String, LifecycleOwner, FragmentResultListener) .
|
final @NonNull int |
This method is deprecated.
When using the target fragment replacement of FragmentManager#setFragmentResultListener(String, LifecycleOwner, FragmentResultListener) and FragmentManager#setFragmentResult(String, Bundle) , consider using setArguments to pass a {@code requestKey} if you need to support dynamic request keys.
|
final @NonNull CharSequence |
Return a localized, styled CharSequence from the application's package's default string table.
|
@NonNull boolean |
This method is deprecated.
Use FragmentTransaction#setMaxLifecycle(Fragment, Lifecycle.State) instead.
|
@Nullable View |
Get the root view for the fragment's layout (the one returned by onCreateView ), if provided.
|
@NonNull LifecycleOwner |
Get a LifecycleOwner that represents the Fragment's View lifecycle.
|
@NonNull LiveData<LifecycleOwner> |
Retrieve a LiveData which allows you to observe the lifecycle of the Fragment's View .
|
@NonNull ViewModelStore |
Returns the ViewModelStore associated with this Fragment
|
final @NonNull int |
Subclasses can not override hashCode().
|
static @NonNull Fragment |
This method is deprecated.
Use FragmentManager#getFragmentFactory() and FragmentFactory#instantiate(ClassLoader, String)
|
static @NonNull Fragment |
This method is deprecated.
Use FragmentManager#getFragmentFactory() and FragmentFactory#instantiate(ClassLoader, String) , manually calling setArguments on the returned Fragment.
|
final @NonNull boolean |
Return true if the fragment is currently added to its activity.
|
final @NonNull boolean |
Return true if the fragment has been explicitly detached from the UI.
|
final @NonNull boolean |
Return true if the fragment has been hidden.
|
final @NonNull boolean |
Return true if the layout is included as part of an activity view hierarchy via the <fragment> tag.
|
final @NonNull boolean |
Return true if this fragment is currently being removed from its activity.
|
final @NonNull boolean |
Return true if the fragment is in the resumed state.
|
final @NonNull boolean |
Returns true if this fragment is added and its state has already been saved by its host.
|
final @NonNull boolean |
Return true if the fragment is currently visible to the user.
|
@NonNull void |
This method is deprecated.
use onViewCreated for code touching the Fragment's view and onCreate for other initialization.
|
@NonNull void |
This method is deprecated.
use registerForActivityResult with the appropriate ActivityResultContract and handling the result in the callback.
|
@NonNull void |
Called when a fragment is first attached to its context.
|
@NonNull void |
This method is deprecated.
See onAttach .
|
@NonNull void |
This method is deprecated.
The responsibility for listening for fragments being attached has been moved to FragmentManager.
|
@NonNull void |
|
@NonNull boolean |
This hook is called whenever an item in a context menu is selected.
|
@NonNull void |
Called to do initial creation of a fragment.
|
@Nullable Animation |
Called when a fragment loads an animation.
|
@Nullable Animator |
Called when a fragment loads an animator.
|
@NonNull void |
Called when a context menu for the {@code view} is about to be shown.
|
@NonNull void |
Initialize the contents of the Fragment host's standard options menu.
|
@NonNull void |
Called when the fragment is no longer in use.
|
@NonNull void |
Called when this fragment's option menu items are no longer being included in the overall options menu.
|
@NonNull void |
Called when the fragment is no longer attached to its activity.
|
@NonNull LayoutInflater |
Returns the LayoutInflater used to inflate Views of this Fragment.
|
@NonNull void |
Called when the hidden state (as returned by isHidden of the fragment has changed.
|
@NonNull void |
Called when a fragment is being created as part of a view layout inflation, typically from setting the content view of an activity.
|
@NonNull void |
This method is deprecated.
See onInflate .
|
@NonNull void |
|
@NonNull void |
Called when the Fragment's activity changes from fullscreen mode to multi-window mode and visa-versa.
|
@NonNull boolean |
This hook is called whenever an item in your options menu is selected.
|
@NonNull void |
This hook is called whenever the options menu is being closed (either by the user canceling the menu with the back/menu button, or when an item is selected).
|
@NonNull void |
Called when the Fragment is no longer resumed.
|
@NonNull void |
Called by the system when the activity changes to and from picture-in-picture mode.
|
@NonNull void |
Prepare the Fragment host's standard options menu to be displayed.
|
@NonNull void |
Callback for when the primary navigation state of this Fragment has changed.
|
@NonNull void |
This method is deprecated.
use registerForActivityResult passing in a RequestMultiplePermissions object for the ActivityResultContract and handling the result in the callback.
|
@NonNull void |
Called when the fragment is visible to the user and actively running.
|
@NonNull void |
Called to ask the fragment to save its current dynamic state, so it can later be reconstructed in a new instance if its process is restarted.
|
@NonNull void |
Called when the Fragment is visible to the user.
|
@NonNull void |
Called when the Fragment is no longer started.
|
@NonNull void |
Called when all saved state has been restored into the view hierarchy of the fragment.
|
@NonNull void |
Postpone the entering Fragment transition until startPostponedEnterTransition or FragmentManager#executePendingTransactions() has been called.
|
final @NonNull void |
Postpone the entering Fragment transition for a given amount of time and then call startPostponedEnterTransition .
|
final @NonNull ActivityResultLauncher<I> |
If the host of this fragment is an ActivityResultRegistryOwner the ActivityResultRegistry of the host will be used.
|
final @NonNull ActivityResultLauncher<I> |
|
@NonNull void |
Registers a context menu to be shown for the given view (multiple views can show the context menu).
|
final @NonNull void |
This method is deprecated.
use registerForActivityResult passing in a RequestMultiplePermissions object for the ActivityResultContract and handling the result in the callback.
|
final @NonNull FragmentActivity |
Return the FragmentActivity this fragment is currently associated with.
|
final @NonNull Bundle |
Return the arguments supplied when the fragment was instantiated.
|
final @NonNull Context |
Return the Context this fragment is currently associated with.
|
final @NonNull FragmentManager |
This method is deprecated.
This has been renamed to getParentFragmentManager() to make it clear that you are accessing the FragmentManager that contains this Fragment and not the FragmentManager associated with child Fragments.
|
final @NonNull Object |
Return the host object of this fragment.
|
final @NonNull Fragment |
Returns the parent Fragment containing this Fragment.
|
final @NonNull View |
Get the root view for the fragment's layout (the one returned by onCreateView ).
|
@NonNull void |
Sets whether the the exit transition and enter transition overlap or not.
|
@NonNull void |
Sets whether the the return transition and reenter transition overlap or not.
|
@NonNull void |
Supply the construction arguments for this fragment.
|
@NonNull void |
When custom transitions are used with Fragments, the enter transition callback is called when this Fragment is attached or detached when not popping the back stack.
|
@NonNull void |
Sets the Transition that will be used to move Views into the initial scene.
|
@NonNull void |
When custom transitions are used with Fragments, the exit transition callback is called when this Fragment is attached or detached when popping the back stack.
|
@NonNull void |
Sets 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.
|
@NonNull void |
Report that this fragment would like to participate in populating the options menu by receiving a call to onCreateOptionsMenu and related methods.
|
@NonNull void |
Set the initial saved state that this Fragment should restore itself from when first being constructed, as returned by FragmentManager.saveFragmentInstanceState .
|
@NonNull void |
Set a hint for whether this fragment's menu should be visible.
|
@NonNull void |
Sets the Transition that will be used to move Views in to the scene when returning due to popping a back stack.
|
@NonNull void |
This method is deprecated.
Instead of retaining the Fragment itself, use a non-retained Fragment and keep retained state in a ViewModel attached to that Fragment.
|
@NonNull void |
Sets 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.
|
@NonNull void |
Sets the Transition that will be used for shared elements transferred into the content Scene.
|
@NonNull void |
Sets the Transition that will be used for shared elements transferred back during a pop of the back stack.
|
@NonNull void |
This method is deprecated.
Instead of using a target fragment to pass results, the fragment requesting a result should use FragmentManager#setFragmentResultListener(String, LifecycleOwner, FragmentResultListener) to register a FragmentResultListener with a {@code * requestKey} using its parent fragment manager .
|
@NonNull void |
This method is deprecated.
If you are manually calling this method, use FragmentTransaction#setMaxLifecycle(Fragment, Lifecycle.State) instead.
|
@NonNull boolean |
Gets whether you should show UI with rationale before requesting a permission.
|
@NonNull void |
Call Activity#startActivity(Intent) from the fragment's containing Activity.
|
@NonNull void |
Call Activity#startActivity(Intent, Bundle) from the fragment's containing Activity.
|
@NonNull void |
This method is deprecated.
use registerForActivityResult passing in a StartActivityForResult object for the ActivityResultContract.
|
@NonNull void |
This method is deprecated.
use registerForActivityResult passing in a StartActivityForResult object for the ActivityResultContract.
|
@NonNull void |
This method is deprecated.
use registerForActivityResult passing in a StartIntentSenderForResult object for the ActivityResultContract.
|
@NonNull void |
Begin postponed transitions after postponeEnterTransition was called.
|
@NonNull String |
|
@NonNull void |
Prevents a context menu to be shown for the given view.
|