Fragment
open class Fragment : ComponentCallbacks, OnCreateContextMenuListener, LifecycleOwner, ViewModelStoreOwner, HasDefaultViewModelProviderFactory, SavedStateRegistryOwner, ActivityResultCaller
kotlin.Any | |
↳ | androidx.fragment.app.Fragment |
Static library support version of the framework's android.app.Fragment
. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework android.app.Fragment
documentation for a class overview.
The main differences when using this support version instead of the framework version are:
- Your activity must extend
FragmentActivity
- You must call
FragmentActivity#getSupportFragmentManager
to get theFragmentManager
Summary
Nested classes | |
---|---|
open |
Thrown by |
open |
State information that has been retrieved from a fragment instance through |
Public constructors | |
---|---|
<init>() Constructor used by the default |
|
Alternate constructor that can be called from your default, no argument constructor to provide a default layout that will be inflated by |
Public methods | |
---|---|
open 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 |
Subclasses can not override equals(). |
FragmentActivity? |
Return the |
open Boolean |
Returns whether the the exit transition and enter transition overlap or not. |
open Boolean |
Returns whether the the return transition and reenter transition overlap or not. |
Bundle? |
Return the arguments supplied when the fragment was instantiated, if any. |
FragmentManager |
Return a private FragmentManager for placing and managing Fragments inside of this Fragment. |
open Context? |
Return the |
open ViewModelProvider.Factory |
Returns the default |
open Any? |
Returns the Transition that will be used to move Views into the initial scene. |
open Any? |
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. |
FragmentManager? |
Return the FragmentManager for interacting with fragments associated with this fragment's activity. |
Any? |
getHost() Return the host object of this fragment. |
Int |
getId() Return the identifier this fragment is known by. |
LayoutInflater |
Returns the cached LayoutInflater used to inflate Views of this Fragment. |
open Lifecycle |
Returns the Lifecycle of the provider. |
open LoaderManager |
Return the LoaderManager for this fragment. |
Fragment? |
Returns the parent Fragment containing this Fragment. |
FragmentManager |
Return the FragmentManager for interacting with fragments associated with this fragment's activity. |
open Any? |
Returns the Transition that will be used to move Views in to the scene when returning due to popping a back stack. |
Resources |
Return |
Boolean |
Returns |
open Any? |
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. |
SavedStateRegistry | |
open Any? |
Returns the Transition that will be used for shared elements transferred into the content Scene. |
open Any? |
< |