Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.


open class Fragment : ComponentCallbacks, OnCreateContextMenuListener, LifecycleOwner, ViewModelStoreOwner, HasDefaultViewModelProviderFactory, SavedStateRegistryOwner, ActivityResultCaller

Static library support version of the framework's 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 documentation for a class overview.

The main differences when using this support version instead of the framework version are:


Nested classes

Thrown by FragmentFactory#instantiate(ClassLoader, String) when there is an instantiation failure.


State information that has been retrieved from a fragment instance through FragmentManager.saveFragmentInstanceState.

Public constructors

Constructor used by the default FragmentFactory.

<init>(@LayoutRes contentLayoutId: Int)

Alternate constructor that can be called from your default, no argument constructor to provide a default layout that will be inflated by onCreateView(LayoutInflater, ViewGroup, Bundle).

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.

equals(@Nullable other: Any?)

Subclasses can not override equals().


Return the FragmentActivity this fragment is currently associated with.

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.


Return the arguments supplied when the fragment was instantiated, if any.


Return a private FragmentManager for placing and managing Fragments inside of this Fragment.

open Context?

Return the Context this fragment is currently associated with.

open ViewModelProvider.Factory

Returns the default ViewModelProvider.Factory that should be used when no custom Factory is provided to the ViewModelProvider constructors.

open Any?

Returns the Transition that will be used to move Views into the initial scene.

open Any?