# PreferenceFragment

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# PreferenceFragment

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/preference/PreferenceFragment "View this page in Java")  

```
abstract class PreferenceFragment : Fragment
```

|---|---|--------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                    |||
| ↳ | [android.app.Fragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#)                                 ||
|   | ↳ | [android.preference.PreferenceFragment](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#) |

*** ** * ** ***

| **This class was deprecated in API level 28.**
|
| Use the [AndroidX](https://developer.android.com/jetpack/androidx.html) [Preference Library](https://developer.android.com/reference/androidx/preference/package-summary.html) for consistent behavior across all devices. For more information on using the AndroidX Preference Library see [Settings](https://developer.android.com/guide/topics/ui/settings.html).

Shows a hierarchy of [Preference](https://developer.android.com/reference/kotlin/android/preference/Preference) objects as lists. These preferences will automatically save to [SharedPreferences](https://developer.android.com/reference/kotlin/android/content/SharedPreferences.html#) as the user interacts with them. To retrieve an instance of [SharedPreferences](https://developer.android.com/reference/kotlin/android/content/SharedPreferences.html#) that the preference hierarchy in this fragment will use, call [PreferenceManager.getDefaultSharedPreferences(android.content.Context)](https://developer.android.com/reference/kotlin/android/preference/PreferenceManager#getDefaultSharedPreferences(android.content.Context)) with a context in the same package as this fragment.

Furthermore, the preferences shown will follow the visual style of system preferences. It is easy to create a hierarchy of preferences (that can be shown on multiple screens) via XML. For these reasons, it is recommended to use this fragment (as a superclass) to deal with preferences in applications.

A [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen) object should be at the top of the preference hierarchy. Furthermore, subsequent [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen) in the hierarchy denote a screen break--that is the preferences contained within subsequent [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen) should be shown on another screen. The preference framework handles showing these other screens from the preference hierarchy.

The preference hierarchy can be formed in multiple ways:
- From an XML file specifying the hierarchy
- From different [Activities](https://developer.android.com/reference/kotlin/android/app/Activity.html#) that each specify its own preferences in an XML file via [Activity](https://developer.android.com/reference/kotlin/android/app/Activity.html#) meta-data
- From an object hierarchy rooted with [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen)

  To inflate from XML, use the [addPreferencesFromResource(int)](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#addPreferencesFromResource(kotlin.Int)). The root element should be a [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen). Subsequent elements can point to actual [Preference](https://developer.android.com/reference/kotlin/android/preference/Preference) subclasses. As mentioned above, subsequent [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen) in the hierarchy will result in the screen break.

  To specify an [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#) to query [Activities](https://developer.android.com/reference/kotlin/android/app/Activity.html#) that each have preferences, use [addPreferencesFromIntent](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#addPreferencesFromIntent(android.content.Intent)). Each [Activity](https://developer.android.com/reference/kotlin/android/app/Activity.html#) can specify meta-data in the manifest (via the key [PreferenceManager.METADATA_KEY_PREFERENCES](https://developer.android.com/reference/kotlin/android/preference/PreferenceManager#METADATA_KEY_PREFERENCES:kotlin.String)) that points to an XML resource. These XML resources will be inflated into a single preference hierarchy and shown by this fragment.

  To specify an object hierarchy rooted with [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen), use [setPreferenceScreen(android.preference.PreferenceScreen)](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#setPreferenceScreen(android.preference.PreferenceScreen)).

  As a convenience, this fragment implements a click listener for any preference in the current hierarchy, see [onPreferenceTreeClick(android.preference.PreferenceScreen,android.preference.Preference)](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onPreferenceTreeClick(android.preference.PreferenceScreen,%20android.preference.Preference)).
  |
  | ### Developer Guides
  |
  | For information about using `PreferenceFragment`, read the [Settings](https://developer.android.com/guide/topics/ui/settings.html) guide.

## Summary

|                                                                                                                                                        Nested classes                                                                                                                                                        ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract | [OnPreferenceStartFragmentCallback](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment.OnPreferenceStartFragmentCallback) Interface that PreferenceFragment's containing activity should implement to be able to process preference items that wish to switch to a new fragment. |

| Inherited constants ||
|---|---|
| From class [ComponentCallbacks2](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#) |----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TRIM_MEMORY_BACKGROUND](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#TRIM_MEMORY_BACKGROUND:kotlin.Int) Level for [onTrimMemory(int)](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#onTrimMemory(kotlin.Int)): the process has gone on to the LRU list. This is a good opportunity to clean up resources that can efficiently and quickly be re-built if the user returns to the app. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TRIM_MEMORY_COMPLETE](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#TRIM_MEMORY_COMPLETE:kotlin.Int) Level for [onTrimMemory(int)](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#onTrimMemory(kotlin.Int)): the process is nearing the end of the background LRU list, and if more memory isn't found soon it will be killed. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TRIM_MEMORY_MODERATE](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#TRIM_MEMORY_MODERATE:kotlin.Int) Level for [onTrimMemory(int)](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#onTrimMemory(kotlin.Int)): the process is around the middle of the background LRU list; freeing memory can help the system keep other processes running later in the list for better overall performance. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TRIM_MEMORY_RUNNING_CRITICAL](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_CRITICAL:kotlin.Int) Level for [onTrimMemory(int)](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#onTrimMemory(kotlin.Int)): the process is not an expendable background process, but the device is running extremely low on memory and is about to not be able to keep any background processes running. Your running process should free up as many non-critical resources as it can to allow that memory to be used elsewhere. The next thing that will happen after this is [onLowMemory()](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks.html#onLowMemory()) called to report that nothing at all can be kept in the background, a situation that can start to notably impact the user. <br /> | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TRIM_MEMORY_RUNNING_LOW](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_LOW:kotlin.Int) Level for [onTrimMemory(int)](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#onTrimMemory(kotlin.Int)): the process is not an expendable background process, but the device is running low on memory. Your running process should free up unneeded resources to allow that memory to be used elsewhere. <br />                                                                                                                                                                                                                                                                                                                                                                                                               | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TRIM_MEMORY_RUNNING_MODERATE](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_MODERATE:kotlin.Int) Level for [onTrimMemory(int)](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#onTrimMemory(kotlin.Int)): the process is not an expendable background process, but the device is running moderately low on memory. Your running process may want to release some unneeded resources for use elsewhere. <br />                                                                                                                                                                                                                                                                                                                                                                                                        | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [TRIM_MEMORY_UI_HIDDEN](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#TRIM_MEMORY_UI_HIDDEN:kotlin.Int) Level for [onTrimMemory(int)](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#onTrimMemory(kotlin.Int)): the process had been showing a user interface, and is no longer doing so. Large allocations with the UI should be released at this point to allow memory to be better managed. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                    | ||

|                                                              Public constructors                                                              ||
|--------------------------------------------------------------------------------------------------------------------------------------------|---|
| [PreferenceFragment](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#PreferenceFragment())`()` <br /> |

|                                                                                                                                                                                                                                                                                                                                                                                                                 Public methods                                                                                                                                                                                                                                                                                                                                                                                                                  ||
|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [addPreferencesFromIntent](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#addPreferencesFromIntent(android.content.Intent))`(`intent:` `[Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)!`)` Adds preferences from activities that match the given [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#).                                                                                                                                                                                                                                                                                                            |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [addPreferencesFromResource](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#addPreferencesFromResource(kotlin.Int))`(`preferencesResId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Inflates the given XML resource and adds the preference hierarchy to the current preference hierarchy.                                                                                                                                                                                                                                                                                                                                                            |
| open [Preference](https://developer.android.com/reference/kotlin/android/preference/Preference)!               | [findPreference](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#findPreference(kotlin.CharSequence))`(`key:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` Finds a [Preference](https://developer.android.com/reference/kotlin/android/preference/Preference) based on its key.                                                                                                                                                                                                                                                                                                                                                      |
| open [PreferenceManager](https://developer.android.com/reference/kotlin/android/preference/PreferenceManager)! | [getPreferenceManager](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#getPreferenceManager())`()` Returns the [PreferenceManager](https://developer.android.com/reference/kotlin/android/preference/PreferenceManager) used by this fragment.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| open [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen)!   | [getPreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#getPreferenceScreen())`()` Gets the root of the preference hierarchy that this fragment is showing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onActivityCreated](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onActivityCreated(android.os.Bundle))`(`savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` Called when the fragment's activity has been created and this fragment's view hierarchy instantiated.                                                                                                                                                                                                                                                                                                                                                               |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onActivityResult](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onActivityResult(kotlin.Int,%20kotlin.Int,%20android.content.Intent))`(`requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `resultCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `data:` `[Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)!`)` <br />                                                                                                                                                                                                                                               |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onCreate](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onCreate(android.os.Bundle))`(`savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` Called to do initial creation of a fragment.                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| open [View](https://developer.android.com/reference/kotlin/android/view/View.html#)?                           | [onCreateView](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle))`(`inflater:` `[LayoutInflater](https://developer.android.com/reference/kotlin/android/view/LayoutInflater.html#)!`, `container:` `[ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)?`, `savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` Called to have the fragment instantiate its user interface view.                                                                                                                        |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onDestroy](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onDestroy())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onDestroyView](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onDestroyView())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                        | [onPreferenceTreeClick](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onPreferenceTreeClick(android.preference.PreferenceScreen,%20android.preference.Preference))`(`preferenceScreen:` `[PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen)!`, `preference:` `[Preference](https://developer.android.com/reference/kotlin/android/preference/Preference)!`)` <br />                                                                                                                                                                                                                                                                  |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onSaveInstanceState](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onSaveInstanceState(android.os.Bundle))`(`outState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onStart](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onStart())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onStop](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onStop())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onViewCreated](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#onViewCreated(android.view.View,%20android.os.Bundle))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` Called immediately after [onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)) has returned, but before any saved state has been restored in to the view. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [setPreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceFragment#setPreferenceScreen(android.preference.PreferenceScreen))`(`preferenceScreen:` `[PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen)!`)` Sets the root of the preference hierarchy that this fragment is showing.                                                                                                                                                                                                                                                                                                                                                  |

| Inherited functions ||
|---|---|
| From class [Fragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#) |------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [dump](https://developer.android.com/reference/kotlin/android/app/Fragment.html#dump(kotlin.String,%20java.io.FileDescriptor,%20java.io.PrintWriter,%20kotlin.Array))`(`prefix:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `fd:` `[FileDescriptor](https://developer.android.com/reference/kotlin/java/io/FileDescriptor.html#)!`, `writer:` `[PrintWriter](https://developer.android.com/reference/kotlin/java/io/PrintWriter.html#)!`, `args:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>!`)` Print the Fragments's state into the given stream. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [equals](https://developer.android.com/reference/kotlin/android/app/Fragment.html#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` Subclasses can not override equals(). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Activity](https://developer.android.com/reference/kotlin/android/app/Activity.html#)!               | [getActivity](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getActivity())`()` Return the Activity this fragment is currently associated with. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [getAllowEnterTransitionOverlap](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getAllowEnterTransitionOverlap())`()` Returns whether 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. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [getAllowReturnTransitionOverlap](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getAllowReturnTransitionOverlap())`()` Returns whether 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. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!                    | [getArguments](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getArguments())`()` Return the arguments supplied to [setArguments](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setArguments(android.os.Bundle)), if any. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [FragmentManager](https://developer.android.com/reference/kotlin/android/app/FragmentManager.html#)! | [getChildFragmentManager](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getChildFragmentManager())`()` Return a private FragmentManager for placing and managing Fragments inside of this Fragment. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!             | [getContext](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getContext())`()` Return the [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#) this fragment is currently associated with. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!    | [getEnterTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#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](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#isTransitionGroup()) return true. Typical Transitions will extend [android.transition.Visibility](https://developer.android.com/reference/kotlin/android/transition/Visibility.html#) as entering is governed by changing visibility from [View.INVISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#INVISIBLE:kotlin.Int) to [View.VISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#VISIBLE:kotlin.Int). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!    | [getExitTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#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](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#isTransitionGroup()) return true. Typical Transitions will extend [android.transition.Visibility](https://developer.android.com/reference/kotlin/android/transition/Visibility.html#) as exiting is governed by changing visibility from [View.VISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#VISIBLE:kotlin.Int) to [View.INVISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#INVISIBLE:kotlin.Int). If transition is null, the views will remain unaffected. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [FragmentManager](https://developer.android.com/reference/kotlin/android/app/FragmentManager.html#)! | [getFragmentManager](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getFragmentManager())`()` Return the FragmentManager for interacting with fragments associated with this fragment's activity. Note that this will be non-null slightly before [getActivity()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getActivity()), during the time from when the fragment is placed in a [FragmentTransaction](https://developer.android.com/reference/kotlin/android/app/FragmentTransaction.html#) 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()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getChildFragmentManager()). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?                          | [getHost](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getHost())`()` Return the host object of this fragment. May return `null` if the fragment isn't currently being hosted. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                           | [getId](https://developer.android.com/reference/kotlin/android/app/Fragment.html#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. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [LayoutInflater](https://developer.android.com/reference/kotlin/android/view/LayoutInflater.html#)!  | [getLayoutInflater](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getLayoutInflater())`()` Returns the cached LayoutInflater used to inflate Views of this Fragment. If [onGetLayoutInflater(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onGetLayoutInflater(android.os.Bundle)) has not been called [onGetLayoutInflater(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onGetLayoutInflater(android.os.Bundle)) will be called with a `null` argument and that value will be cached. The cached LayoutInflater will be replaced immediately prior to [onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)) and cleared immediately after [onDetach()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onDetach()). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [LoaderManager](https://developer.android.com/reference/kotlin/android/app/LoaderManager.html#)!     | [getLoaderManager](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getLoaderManager())`()` Return the LoaderManager for this fragment, creating it if needed. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Fragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#)!               | [getParentFragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getParentFragment())`()` Returns the parent Fragment containing this Fragment. If this Fragment is attached directly to an Activity, returns null. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!    | [getReenterTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#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](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#isTransitionGroup()) return true. Typical Transitions will extend [android.transition.Visibility](https://developer.android.com/reference/kotlin/android/transition/Visibility.html#) as exiting is governed by changing visibility from [View.VISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#VISIBLE:kotlin.Int) to [View.INVISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#INVISIBLE:kotlin.Int). If transition is null, the views will remain unaffected. If nothing is set, the default will be to use the same transition as [setExitTransition(android.transition.Transition)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setExitTransition(android.transition.Transition)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Resources](https://developer.android.com/reference/kotlin/android/content/res/Resources.html#)!     | [getResources](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getResources())`()` Return `getActivity().getResources()`. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [getRetainInstance](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getRetainInstance())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!    | [getReturnTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#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](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#isTransitionGroup()) return true. Typical Transitions will extend [android.transition.Visibility](https://developer.android.com/reference/kotlin/android/transition/Visibility.html#) as entering is governed by changing visibility from [View.VISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#VISIBLE:kotlin.Int) to [View.INVISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#INVISIBLE:kotlin.Int). If `transition` is null, entering Views will remain unaffected. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!    | [getSharedElementEnterTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#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](https://developer.android.com/reference/kotlin/android/transition/ChangeBounds.html#). A null value will cause transferred shared elements to blink to the final position. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!    | [getSharedElementReturnTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#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](https://developer.android.com/reference/kotlin/android/transition/ChangeBounds.html#). 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(android.transition.Transition)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setSharedElementEnterTransition(android.transition.Transition)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!                    | [getString](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getString(kotlin.Int))`(`resId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Return a localized string from the application's package's default string table. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!                    | [getString](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getString(kotlin.Int,%20kotlin.Any))`(`resId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `vararg` `formatArgs:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` Return a localized formatted string from the application's package's default string table, substituting the format arguments as defined in [java.util.Formatter](https://developer.android.com/reference/kotlin/java/util/Formatter.html#) and java.lang.String#format. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!                    | [getTag](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getTag())`()` Get the tag name of the fragment, if specified. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Fragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#)!               | [getTargetFragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getTargetFragment())`()` Return the target fragment set by [setTargetFragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setTargetFragment(android.app.Fragment,%20kotlin.Int)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                           | [getTargetRequestCode](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getTargetRequestCode())`()` Return the target request code set by [setTargetFragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setTargetFragment(android.app.Fragment,%20kotlin.Int)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!       | [getText](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getText(kotlin.Int))`(`resId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Return a localized, styled CharSequence from the application's package's default string table. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [getUserVisibleHint](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getUserVisibleHint())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)?                      | [getView](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getView())`()` Get the root view for the fragment's layout (the one returned by [onCreateView](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle))), if provided. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                           | [hashCode](https://developer.android.com/reference/kotlin/android/app/Fragment.html#hashCode())`()` Subclasses can not override hashCode(). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Fragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#)!               | [instantiate](https://developer.android.com/reference/kotlin/android/app/Fragment.html#instantiate(android.content.Context,%20kotlin.String))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `fname:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Like [instantiate(android.content.Context,java.lang.String,android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#instantiate(android.content.Context,%20kotlin.String,%20android.os.Bundle)) but with a null argument Bundle. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Fragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#)!               | [instantiate](https://developer.android.com/reference/kotlin/android/app/Fragment.html#instantiate(android.content.Context,%20kotlin.String,%20android.os.Bundle))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `fname:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `args:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` Create a new instance of a Fragment with the given class name. This is the same as calling its empty constructor. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [isAdded](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isAdded())`()` Return true if the fragment is currently added to its activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [isDetached](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isDetached())`()` Return true if the fragment has been explicitly detached from the UI. That is, [FragmentTransaction.detach(Fragment)](https://developer.android.com/reference/kotlin/android/app/FragmentTransaction.html#detach(android.app.Fragment)) has been used on it. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [isHidden](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isHidden())`()` Return true if the fragment has been hidden. By default fragments are shown. You can find out about changes to this state with [onHiddenChanged](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onHiddenChanged(kotlin.Boolean)). Note that the hidden state is orthogonal to other states -- that is, to be visible to the user, a fragment must be both started and not hidden. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [isInLayout](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isInLayout())`()` Return true if the layout is included as part of an activity view hierarchy via the \<fragment\> tag. This will always be true when fragments are created through the \<fragment\> tag, *except* in the case where an old fragment is restored from a previous state and it does not appear in the layout of the current state. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [isRemoving](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isRemoving())`()` Return true if this fragment is currently being removed from its activity. This is *not* whether its activity is finishing, but rather whether it is in the process of being removed from its activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [isResumed](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isResumed())`()` Return true if the fragment is in the resumed state. This is true for the duration of [onResume()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onResume()) and [onPause()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onPause()) as well. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [isStateSaved](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isStateSaved())`()` Returns true if this fragment is added and its state has already been saved by its host. Any operations that would change saved state should not be performed if this method returns true, and some operations such as [setArguments(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setArguments(android.os.Bundle)) will fail. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [isVisible](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isVisible())`()` Return true if the fragment is currently visible to the user. This means it: (1) has been added, (2) has its view attached to the window, and (3) is not hidden. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onAttach](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onAttach(android.app.Activity))`(`activity:` `[Activity](https://developer.android.com/reference/kotlin/android/app/Activity.html#)!`)` <br /> If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onAttach](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onAttach(android.content.Context))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`)` Called when a fragment is first attached to its context. [onCreate(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreate(android.os.Bundle)) will be called after this. If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onAttachFragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onAttachFragment(android.app.Fragment))`(`childFragment:` `[Fragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#)!`)` Called when a fragment is attached as a child of this fragment. This is called after the attached fragment's `onAttach` and before the attached fragment's `onCreate` if the fragment has not yet had a previous call to `onCreate`. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onConfigurationChanged](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onConfigurationChanged(android.content.res.Configuration))`(`newConfig:` `[Configuration](https://developer.android.com/reference/kotlin/android/content/res/Configuration.html#)`)` Called by the system when the device configuration changes while your component is running. Note that, unlike activities, other components are never restarted when a configuration changes: they must always deal with the results of the change, such as by re-retrieving resources. At the time that this function has been called, your Resources object will have been updated to return resource values matching the new configuration. For more information, read [Handling Runtime Changes](https://developer.android.com/guide/topics/resources/runtime-changes.html). If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [onContextItemSelected](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onContextItemSelected(android.view.MenuItem))`(`item:` `[MenuItem](https://developer.android.com/reference/kotlin/android/view/MenuItem.html#)!`)` This hook is called whenever an item in a context menu is selected. The default implementation simply returns false to have the normal processing happen (calling the item's Runnable or sending a message to its Handler as appropriate). You can use this method for any items for which you would like to do processing without those other facilities. Use [MenuItem.getMenuInfo()](https://developer.android.com/reference/kotlin/android/view/MenuItem.html#getMenuInfo()) to get extra information set by the View that added this menu item. Derived classes should call through to the base class for it to perform the default menu handling. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Animator](https://developer.android.com/reference/kotlin/android/animation/Animator.html#)!         | [onCreateAnimator](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateAnimator(kotlin.Int,%20kotlin.Boolean,%20kotlin.Int))`(`transit:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `enter:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `nextAnim:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called when a fragment loads an animation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onCreateContextMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo))`(`menu:` `[ContextMenu](https://developer.android.com/reference/kotlin/android/view/ContextMenu.html#)!`, `v:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `menuInfo:` `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/kotlin/android/view/ContextMenu.ContextMenuInfo.html#)!`)` Called when a context menu for the `view` is about to be shown. Unlike [onCreateOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateOptionsMenu(android.view.Menu,%20android.view.MenuInflater)), this will be called every time the context menu is about to be shown and should be populated for the view (or item inside the view for [AdapterView](https://developer.android.com/reference/kotlin/android/widget/AdapterView.html#) subclasses, this can be found in the `menuInfo`)). Use [onContextItemSelected(android.view.MenuItem)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onContextItemSelected(android.view.MenuItem)) to know when an item has been selected. The default implementation calls up to [Activity.onCreateContextMenu](https://developer.android.com/reference/kotlin/android/app/Activity.html#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)), though you can not call this implementation if you don't want that behavior. It is not safe to hold onto the context menu after this method returns. Called when the context menu for this view is being built. It is not safe to hold onto the menu after this method returns. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onCreateOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateOptionsMenu(android.view.Menu,%20android.view.MenuInflater))`(`menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)!`, `inflater:` `[MenuInflater](https://developer.android.com/reference/kotlin/android/view/MenuInflater.html#)!`)` Initialize the contents of the Activity's standard options menu. You should place your menu items in to menu. For this method to be called, you must have first called [setHasOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setHasOptionsMenu(kotlin.Boolean)). See [Activity.onCreateOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu)) for more information. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onDestroyOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onDestroyOptionsMenu())`()` Called when this fragment's option menu items are no longer being included in the overall options menu. Receiving this call means that the menu needed to be rebuilt, but this fragment's items were not included in the newly built menu (its [onCreateOptionsMenu(android.view.Menu,android.view.MenuInflater)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateOptionsMenu(android.view.Menu,%20android.view.MenuInflater)) was not called). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onDetach](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onDetach())`()` Called when the fragment is no longer attached to its activity. This is called after [onDestroy()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onDestroy()), except in the cases where the fragment instance is retained across Activity re-creation (see [setRetainInstance(boolean)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setRetainInstance(kotlin.Boolean))), in which case it is called after [onStop()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onStop()). If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [LayoutInflater](https://developer.android.com/reference/kotlin/android/view/LayoutInflater.html#)!  | [onGetLayoutInflater](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onGetLayoutInflater(android.os.Bundle))`(`savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` Returns the LayoutInflater used to inflate Views of this Fragment. The default implementation will throw an exception if the Fragment is not attached. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onHiddenChanged](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onHiddenChanged(kotlin.Boolean))`(`hidden:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the hidden state (as returned by [isHidden()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isHidden()) of the fragment has changed. Fragments start out not hidden; this will be called whenever the fragment changes state from that. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onInflate](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onInflate(android.app.Activity,%20android.util.AttributeSet,%20android.os.Bundle))`(`activity:` `[Activity](https://developer.android.com/reference/kotlin/android/app/Activity.html#)!`, `attrs:` `[AttributeSet](https://developer.android.com/reference/kotlin/android/util/AttributeSet.html#)!`, `savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` <br /> If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onInflate](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onInflate(android.content.Context,%20android.util.AttributeSet,%20android.os.Bundle))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `attrs:` `[AttributeSet](https://developer.android.com/reference/kotlin/android/util/AttributeSet.html#)!`, `savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` Called when a fragment is being created as part of a view layout inflation, typically from setting the content view of an activity. This may be called immediately after the fragment is created from a tag in a layout file. Note this is *before* the fragment's [onAttach(android.app.Activity)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onAttach(android.app.Activity)) has been called; all you should do here is parse the attributes and save them away. This is called every time the fragment is inflated, even if it is being inflated into a new instance with saved state. It typically makes sense to re-parse the parameters each time, to allow them to change with different configurations. Here is a typical implementation of a fragment that can take parameters both through attributes supplied here as well from [getArguments()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#getArguments()): Note that parsing the XML attributes uses a "styleable" resource. The declaration for the styleable used here is: The fragment can then be declared within its activity's content layout through a tag like this: This fragment can also be created dynamically from arguments given at runtime in the arguments Bundle; here is an example of doing so at creation of the containing activity: <br /> If you override this method you *must* call through to the superclass implementation. <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onInflate](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onInflate(android.util.AttributeSet,%20android.os.Bundle))`(`attrs:` `[AttributeSet](https://developer.android.com/reference/kotlin/android/util/AttributeSet.html#)!`, `savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` <br /> If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onLowMemory](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onLowMemory())`()` This is called when the overall system is running low on memory, and actively running processes should trim their memory usage. While the exact point at which this will be called is not defined, generally it will happen when all background process have been killed. That is, before reaching the point of killing processes hosting service and foreground UI that we would like to avoid killing. If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onMultiWindowModeChanged](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onMultiWindowModeChanged(kotlin.Boolean))`(`isInMultiWindowMode:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the Fragment's activity changes from fullscreen mode to multi-window mode and visa-versa. This is generally tied to android.app.Activity#onMultiWindowModeChanged of the containing Activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onMultiWindowModeChanged](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onMultiWindowModeChanged(kotlin.Boolean,%20android.content.res.Configuration))`(`isInMultiWindowMode:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `newConfig:` `[Configuration](https://developer.android.com/reference/kotlin/android/content/res/Configuration.html#)!`)` Called when the Fragment's activity changes from fullscreen mode to multi-window mode and visa-versa. This is generally tied to android.app.Activity#onMultiWindowModeChanged of the containing Activity. This method provides the same configuration that will be sent in the following [onConfigurationChanged(android.content.res.Configuration)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onConfigurationChanged(android.content.res.Configuration)) call after the activity enters this mode. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [onOptionsItemSelected](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onOptionsItemSelected(android.view.MenuItem))`(`item:` `[MenuItem](https://developer.android.com/reference/kotlin/android/view/MenuItem.html#)!`)` This hook is called whenever an item in your options menu is selected. The default implementation simply returns false to have the normal processing happen (calling the item's Runnable or sending a message to its Handler as appropriate). You can use this method for any items for which you would like to do processing without those other facilities. Derived classes should call through to the base class for it to perform the default menu handling. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onOptionsMenuClosed](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onOptionsMenuClosed(android.view.Menu))`(`menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)!`)` 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). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onPause](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onPause())`()` Called when the Fragment is no longer resumed. This is generally tied to [Activity.onPause](https://developer.android.com/reference/kotlin/android/app/Activity.html#onPause()) of the containing Activity's lifecycle. If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onPictureInPictureModeChanged](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onPictureInPictureModeChanged(kotlin.Boolean))`(`isInPictureInPictureMode:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called by the system when the activity changes to and from picture-in-picture mode. This is generally tied to android.app.Activity#onPictureInPictureModeChanged of the containing Activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onPictureInPictureModeChanged](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onPictureInPictureModeChanged(kotlin.Boolean,%20android.content.res.Configuration))`(`isInPictureInPictureMode:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `newConfig:` `[Configuration](https://developer.android.com/reference/kotlin/android/content/res/Configuration.html#)!`)` Called by the system when the activity changes to and from picture-in-picture mode. This is generally tied to android.app.Activity#onPictureInPictureModeChanged of the containing Activity. This method provides the same configuration that will be sent in the following [onConfigurationChanged(android.content.res.Configuration)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onConfigurationChanged(android.content.res.Configuration)) call after the activity enters this mode. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onPrepareOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onPrepareOptionsMenu(android.view.Menu))`(`menu:` `[Menu](https://developer.android.com/reference/kotlin/android/view/Menu.html#)!`)` Prepare the Screen's standard options menu to be displayed. This is called right before the menu is shown, every time it is shown. You can use this method to efficiently enable/disable items or otherwise dynamically modify the contents. See [Activity.onPrepareOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu)) for more information. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onRequestPermissionsResult](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onRequestPermissionsResult(kotlin.Int,%20kotlin.Array,%20kotlin.IntArray))`(`requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `permissions:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>`, `grantResults:` `[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)`)` Callback for the result from requesting permissions. This method is invoked for every call on [requestPermissions(java.lang.String[],int)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#requestPermissions(kotlin.Array,%20kotlin.Int)). **Note:** It is possible that the permissions request interaction with the user is interrupted. In this case you will receive empty permissions and results arrays which should be treated as a cancellation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onResume](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onResume())`()` Called when the fragment is visible to the user and actively running. This is generally tied to [Activity.onResume](https://developer.android.com/reference/kotlin/android/app/Activity.html#onResume()) of the containing Activity's lifecycle. If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onTrimMemory](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onTrimMemory(kotlin.Int))`(`level:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process. You should never compare to exact values of the level, since new intermediate values may be added -- you will typically want to compare if the value is greater or equal to a level you are interested in. To retrieve the processes current trim level at any point, you can use [ActivityManager.getMyMemoryState(RunningAppProcessInfo)](https://developer.android.com/reference/kotlin/android/app/ActivityManager.html#getMyMemoryState(android.app.ActivityManager.RunningAppProcessInfo)). If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [onViewStateRestored](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onViewStateRestored(android.os.Bundle))`(`savedInstanceState:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` Called when all saved state has been restored into the view hierarchy of the fragment. This can be used to do initialization based on saved state that you are letting the view hierarchy track itself, such as whether check box widgets are currently checked. This is called after [onActivityCreated(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onActivityCreated(android.os.Bundle)) and before [onStart()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onStart()). If you override this method you *must* call through to the superclass implementation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [postponeEnterTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#postponeEnterTransition())`()` Postpone the entering Fragment transition until [startPostponedEnterTransition()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#startPostponedEnterTransition()) or [FragmentManager.executePendingTransactions()](https://developer.android.com/reference/kotlin/android/app/FragmentManager.html#executePendingTransactions()) has been called. This method gives the Fragment the ability to delay Fragment animations until all data is loaded. Until then, the added, shown, and attached Fragments will be INVISIBLE and removed, hidden, and detached Fragments won't be have their Views removed. The transaction runs when all postponed added Fragments in the transaction have called [startPostponedEnterTransition()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#startPostponedEnterTransition()). This method should be called before being added to the FragmentTransaction or in [onCreate(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreate(android.os.Bundle)), [onAttach(android.content.Context)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onAttach(android.content.Context)), or [onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle))}. [startPostponedEnterTransition()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#startPostponedEnterTransition()) must be called to allow the Fragment to start the transitions. When a FragmentTransaction is started that may affect a postponed FragmentTransaction, based on which containers are in their operations, the postponed FragmentTransaction will have its start triggered. The early triggering may result in faulty or nonexistent animations in the postponed transaction. FragmentTransactions that operate only on independent containers will not interfere with each other's postponement. Calling postponeEnterTransition on Fragments with a null View will not postpone the transition. Likewise, postponement only works if FragmentTransaction optimizations are enabled. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [registerForContextMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#registerForContextMenu(android.view.View))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`)` Registers a context menu to be shown for the given view (multiple views can show the context menu). This method will set the [OnCreateContextMenuListener](https://developer.android.com/reference/kotlin/android/view/View.OnCreateContextMenuListener.html#) on the view to this fragment, so [onCreateContextMenu(android.view.ContextMenu,android.view.View,android.view.ContextMenu.ContextMenuInfo)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)) will be called when it is time to show the context menu. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [requestPermissions](https://developer.android.com/reference/kotlin/android/app/Fragment.html#requestPermissions(kotlin.Array,%20kotlin.Int))`(`permissions:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Requests permissions to be granted to this application. These permissions must be requested in your manifest, they should not be granted to your app, and they should have protection level [#PROTECTION_DANGEROUS dangerous](https://developer.android.com/reference/kotlin/android/content/pm/PermissionInfo.html#), regardless whether they are declared by the platform or a third-party app. Normal permissions [android.content.pm.PermissionInfo#PROTECTION_NORMAL](https://developer.android.com/reference/kotlin/android/content/pm/PermissionInfo.html#PROTECTION_NORMAL:kotlin.Int) are granted at install time if requested in the manifest. Signature permissions [android.content.pm.PermissionInfo#PROTECTION_SIGNATURE](https://developer.android.com/reference/kotlin/android/content/pm/PermissionInfo.html#PROTECTION_SIGNATURE:kotlin.Int) are granted at install time if requested in the manifest and the signature of your app matches the signature of the app declaring the permissions. Call [shouldShowRequestPermissionRationale(java.lang.String)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#shouldShowRequestPermissionRationale(kotlin.String)) before calling this API to check if the system recommends to show a rationale UI before asking for a permission. If your app does not have the requested permissions the user will be presented with UI for accepting them. After the user has accepted or rejected the requested permissions you will receive a callback on [onRequestPermissionsResult(int,java.lang.String[],int[])](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onRequestPermissionsResult(kotlin.Int,%20kotlin.Array,%20kotlin.IntArray)) reporting whether the permissions were granted or not. Note that requesting a permission does not guarantee it will be granted and your app should be able to run without having this permission. This method may start an activity allowing the user to choose which permissions to grant and which to reject. Hence, you should be prepared that your activity may be paused and resumed. Further, granting some permissions may require a restart of you application. In such a case, the system will recreate the activity stack before delivering the result to [onRequestPermissionsResult(int,java.lang.String[],int[])](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onRequestPermissionsResult(kotlin.Int,%20kotlin.Array,%20kotlin.IntArray)). When checking whether you have a permission you should use [android.content.Context#checkSelfPermission(String)](https://developer.android.com/reference/kotlin/android/content/Context.html#checkSelfPermission(kotlin.String)). Calling this API for permissions already granted to your app would show UI to the user to decide whether the app can still hold these permissions. This can be useful if the way your app uses data guarded by the permissions changes significantly. You cannot request a permission if your activity sets [noHistory](https://developer.android.com/reference/kotlin/android/R.styleable.html#AndroidManifestActivity_noHistory:kotlin.Int) to `true` because in this case the activity would not receive result callbacks including [onRequestPermissionsResult(int,java.lang.String[],int[])](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onRequestPermissionsResult(kotlin.Int,%20kotlin.Array,%20kotlin.IntArray)). <br /> | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setAllowEnterTransitionOverlap](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setAllowEnterTransitionOverlap(kotlin.Boolean))`(`allow:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Sets whether 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. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setAllowReturnTransitionOverlap](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setAllowReturnTransitionOverlap(kotlin.Boolean))`(`allow:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Sets whether 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. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setArguments](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setArguments(android.os.Bundle))`(`args:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` Supply the construction arguments for this fragment. The arguments supplied here will be retained across fragment destroy and creation. This method cannot be called if the fragment is added to a FragmentManager and if [isStateSaved()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#isStateSaved()) would return true. Prior to [Build.VERSION_CODES.O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int), this method may only be called if the fragment has not yet been added to a FragmentManager. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setEnterSharedElementCallback](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setEnterSharedElementCallback(android.app.SharedElementCallback))`(`callback:` `[SharedElementCallback](https://developer.android.com/reference/kotlin/android/app/SharedElementCallback.html#)!`)` 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. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setEnterTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setEnterTransition(android.transition.Transition))`(`transition:` `[Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!`)` Sets 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](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#isTransitionGroup()) return true. Typical Transitions will extend [android.transition.Visibility](https://developer.android.com/reference/kotlin/android/transition/Visibility.html#) as entering is governed by changing visibility from [View.INVISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#INVISIBLE:kotlin.Int) to [View.VISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#VISIBLE:kotlin.Int). If `transition` is null, entering Views will remain unaffected. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setExitSharedElementCallback](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setExitSharedElementCallback(android.app.SharedElementCallback))`(`callback:` `[SharedElementCallback](https://developer.android.com/reference/kotlin/android/app/SharedElementCallback.html#)!`)` 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. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setExitTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setExitTransition(android.transition.Transition))`(`transition:` `[Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!`)` 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. The exiting Views will be those that are regular Views or ViewGroups that have [ViewGroup.isTransitionGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#isTransitionGroup()) return true. Typical Transitions will extend [android.transition.Visibility](https://developer.android.com/reference/kotlin/android/transition/Visibility.html#) as exiting is governed by changing visibility from [View.VISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#VISIBLE:kotlin.Int) to [View.INVISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#INVISIBLE:kotlin.Int). If transition is null, the views will remain unaffected. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setHasOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setHasOptionsMenu(kotlin.Boolean))`(`hasMenu:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Report that this fragment would like to participate in populating the options menu by receiving a call to [onCreateOptionsMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateOptionsMenu(android.view.Menu,%20android.view.MenuInflater)) and related methods. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setInitialSavedState](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setInitialSavedState(android.app.Fragment.SavedState))`(`state:` `[Fragment.SavedState](https://developer.android.com/reference/kotlin/android/app/Fragment.SavedState.html#)!`)` Set the initial saved state that this Fragment should restore itself from when first being constructed, as returned by [FragmentManager.saveFragmentInstanceState](https://developer.android.com/reference/kotlin/android/app/FragmentManager.html#saveFragmentInstanceState(android.app.Fragment)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setMenuVisibility](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setMenuVisibility(kotlin.Boolean))`(`menuVisible:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Set a hint for whether this fragment's menu should be visible. This is useful if you know that a fragment has been placed in your view hierarchy so that the user can not currently seen it, so any menu items it has should also not be shown. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setReenterTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setReenterTransition(android.transition.Transition))`(`transition:` `[Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!`)` Sets 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](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#isTransitionGroup()) return true. Typical Transitions will extend [android.transition.Visibility](https://developer.android.com/reference/kotlin/android/transition/Visibility.html#) as exiting is governed by changing visibility from [View.VISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#VISIBLE:kotlin.Int) to [View.INVISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#INVISIBLE:kotlin.Int). If transition is null, the views will remain unaffected. If nothing is set, the default will be to use the same transition as [setExitTransition(android.transition.Transition)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setExitTransition(android.transition.Transition)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setRetainInstance](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setRetainInstance(kotlin.Boolean))`(`retain:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Control whether a fragment instance is retained across Activity re-creation (such as from a configuration change). This can only be used with fragments not in the back stack. If set, the fragment lifecycle will be slightly different when an activity is recreated: - [onDestroy()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onDestroy()) will not be called (but [onDetach()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onDetach()) still will be, because the fragment is being detached from its current activity). - [onCreate(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreate(android.os.Bundle)) will not be called since the fragment is not being re-created. - [onAttach(android.app.Activity)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onAttach(android.app.Activity)) and [onActivityCreated(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onActivityCreated(android.os.Bundle)) **will** still be called. <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setReturnTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setReturnTransition(android.transition.Transition))`(`transition:` `[Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!`)` 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. The exiting Views will be those that are regular Views or ViewGroups that have [ViewGroup.isTransitionGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#isTransitionGroup()) return true. Typical Transitions will extend [android.transition.Visibility](https://developer.android.com/reference/kotlin/android/transition/Visibility.html#) as entering is governed by changing visibility from [View.VISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#VISIBLE:kotlin.Int) to [View.INVISIBLE](https://developer.android.com/reference/kotlin/android/view/View.html#INVISIBLE:kotlin.Int). If `transition` is null, entering Views will remain unaffected. If nothing is set, the default will be to use the same value as set in [setEnterTransition(android.transition.Transition)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setEnterTransition(android.transition.Transition)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setSharedElementEnterTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setSharedElementEnterTransition(android.transition.Transition))`(`transition:` `[Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!`)` Sets 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](https://developer.android.com/reference/kotlin/android/transition/ChangeBounds.html#). A null value will cause transferred shared elements to blink to the final position. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setSharedElementReturnTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setSharedElementReturnTransition(android.transition.Transition))`(`transition:` `[Transition](https://developer.android.com/reference/kotlin/android/transition/Transition.html#)!`)` Sets 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](https://developer.android.com/reference/kotlin/android/transition/ChangeBounds.html#). 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(android.transition.Transition)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setSharedElementEnterTransition(android.transition.Transition)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setTargetFragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setTargetFragment(android.app.Fragment,%20kotlin.Int))`(`fragment:` `[Fragment](https://developer.android.com/reference/kotlin/android/app/Fragment.html#)!`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Optional target for this fragment. This may be used, for example, if this fragment is being started by another, and when done wants to give a result back to the first. The target set here is retained across instances via [FragmentManager.putFragment()](https://developer.android.com/reference/kotlin/android/app/FragmentManager.html#putFragment(android.os.Bundle,%20kotlin.String,%20android.app.Fragment)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [setUserVisibleHint](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setUserVisibleHint(kotlin.Boolean))`(`isVisibleToUser:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Set a hint to the system about whether this fragment's UI is currently visible to the user. This hint defaults to true and is persistent across fragment instance state save and restore. An app may set this to false to indicate that the fragment's UI is scrolled out of visibility or is otherwise not directly visible to the user. This may be used by the system to prioritize operations such as fragment lifecycle updates or loader ordering behavior. **Note:** This method may be called outside of the fragment lifecycle and thus has no ordering guarantees with regard to fragment lifecycle method calls. **Note:** Prior to Android N there was a platform bug that could cause `setUserVisibleHint` to bring a fragment up to the started state before its `FragmentTransaction` had been committed. As some apps relied on this behavior, it is preserved for apps that declare a `targetSdkVersion` of 23 or lower. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                   | [shouldShowRequestPermissionRationale](https://developer.android.com/reference/kotlin/android/app/Fragment.html#shouldShowRequestPermissionRationale(kotlin.String))`(`permission:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Gets whether you should show UI with rationale before requesting a permission. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [startActivity](https://developer.android.com/reference/kotlin/android/app/Fragment.html#startActivity(android.content.Intent))`(`intent:` `[Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)!`)` Call android.app.Activity#startActivity(android.content.Intent) from the fragment's containing Activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [startActivity](https://developer.android.com/reference/kotlin/android/app/Fragment.html#startActivity(android.content.Intent,%20android.os.Bundle))`(`intent:` `[Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)!`, `options:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` Call android.app.Activity#startActivity(android.content.Intent,android.os.Bundle) from the fragment's containing Activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [startActivityForResult](https://developer.android.com/reference/kotlin/android/app/Fragment.html#startActivityForResult(android.content.Intent,%20kotlin.Int))`(`intent:` `[Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)!`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Call [Activity.startActivityForResult(Intent, int)](https://developer.android.com/reference/kotlin/android/app/Activity.html#startActivityForResult(android.content.Intent,%20kotlin.Int)) from the fragment's containing Activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [startActivityForResult](https://developer.android.com/reference/kotlin/android/app/Fragment.html#startActivityForResult(android.content.Intent,%20kotlin.Int,%20android.os.Bundle))`(`intent:` `[Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)!`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `options:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` Call [Activity.startActivityForResult(Intent, int, Bundle)](https://developer.android.com/reference/kotlin/android/app/Activity.html#startActivityForResult(android.content.Intent,%20kotlin.Int,%20android.os.Bundle)) from the fragment's containing Activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [startIntentSenderForResult](https://developer.android.com/reference/kotlin/android/app/Fragment.html#startIntentSenderForResult(android.content.IntentSender,%20kotlin.Int,%20android.content.Intent,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20android.os.Bundle))`(`intent:` `[IntentSender](https://developer.android.com/reference/kotlin/android/content/IntentSender.html#)!`, `requestCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `fillInIntent:` `[Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)?`, `flagsMask:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `flagsValues:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `extraFlags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `options:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` Call [Activity.startIntentSenderForResult(IntentSender, int, Intent, int, int, int,](https://developer.android.com/reference/kotlin/android/app/Activity.html#startIntentSenderForResult(android.content.IntentSender,%20kotlin.Int,%20android.content.Intent,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20android.os.Bundle)) from the fragment's containing Activity. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [startPostponedEnterTransition](https://developer.android.com/reference/kotlin/android/app/Fragment.html#startPostponedEnterTransition())`()` Begin postponed transitions after [postponeEnterTransition()](https://developer.android.com/reference/kotlin/android/app/Fragment.html#postponeEnterTransition()) was called. If postponeEnterTransition() was called, you must call startPostponedEnterTransition() or [FragmentManager.executePendingTransactions()](https://developer.android.com/reference/kotlin/android/app/FragmentManager.html#executePendingTransactions()) to complete the FragmentTransaction. If postponement was interrupted with [FragmentManager.executePendingTransactions()](https://developer.android.com/reference/kotlin/android/app/FragmentManager.html#executePendingTransactions()), before `startPostponedEnterTransition()`, animations may not run or may execute improperly. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                     | [toString](https://developer.android.com/reference/kotlin/android/app/Fragment.html#toString())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                         | [unregisterForContextMenu](https://developer.android.com/reference/kotlin/android/app/Fragment.html#unregisterForContextMenu(android.view.View))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`)` Prevents a context menu to be shown for the given view. This method will remove the [OnCreateContextMenuListener](https://developer.android.com/reference/kotlin/android/view/View.OnCreateContextMenuListener.html#) on the view. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | ||
| From class [ComponentCallbacks](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks.html#) |------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onConfigurationChanged](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks.html#onConfigurationChanged(android.content.res.Configuration))`(`newConfig:` `[Configuration](https://developer.android.com/reference/kotlin/android/content/res/Configuration.html#)`)` Called by the system when the device configuration changes while your component is running. Note that, unlike activities, other components are never restarted when a configuration changes: they must always deal with the results of the change, such as by re-retrieving resources. At the time that this function has been called, your Resources object will have been updated to return resource values matching the new configuration. For more information, read [Handling Runtime Changes](https://developer.android.com/guide/topics/resources/runtime-changes.html). <br /> | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onLowMemory](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks.html#onLowMemory())`()` This is called when the overall system is running low on memory, and actively running processes should trim their memory usage. While the exact point at which this will be called is not defined, generally it will happen when all background process have been killed. That is, before reaching the point of killing processes hosting service and foreground UI that we would like to avoid killing. <br />                                                                                                                                                                                                                                                                                                                                                     | ||

## Public constructors

### PreferenceFragment

```
PreferenceFragment()
```

## Public methods

### addPreferencesFromIntent

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun addPreferencesFromIntent(intent: Intent!): Unit
```

**Deprecated:** *Deprecated in Java.*

Adds preferences from activities that match the given [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#).

|                                                                                                    Parameters                                                                                                    ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `intent` | [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)!: The [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#) to query activities. |

### addPreferencesFromResource

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun addPreferencesFromResource(preferencesResId: Int): Unit
```

**Deprecated:** *Deprecated in Java.*

Inflates the given XML resource and adds the preference hierarchy to the current preference hierarchy.

|                                                           Parameters                                                            ||
|--------------------|-------------------------------------------------------------------------------------------------------------|
| `preferencesResId` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The XML resource ID to inflate. |

### findPreference

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun findPreference(key: CharSequence!): Preference!
```

**Deprecated:** *Deprecated in Java.*

Finds a [Preference](https://developer.android.com/reference/kotlin/android/preference/Preference) based on its key.

|                                                                  Parameters                                                                   ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------|
| `key` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!: The key of the preference to retrieve. |

|                                                                                                       Return                                                                                                       ||
|---------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| [Preference](https://developer.android.com/reference/kotlin/android/preference/Preference)! | The [Preference](https://developer.android.com/reference/kotlin/android/preference/Preference) with the key, or null. |

**See Also**

- [android.preference.PreferenceGroup#findPreference(CharSequence)](https://developer.android.com/reference/kotlin/android/preference/PreferenceGroup#findPreference(kotlin.CharSequence))  

### getPreferenceManager

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getPreferenceManager(): PreferenceManager!
```

**Deprecated:** *Deprecated in Java.*

Returns the [PreferenceManager](https://developer.android.com/reference/kotlin/android/preference/PreferenceManager) used by this fragment.

|                                                                                                          Return                                                                                                          ||
|-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
| [PreferenceManager](https://developer.android.com/reference/kotlin/android/preference/PreferenceManager)! | The [PreferenceManager](https://developer.android.com/reference/kotlin/android/preference/PreferenceManager). |

### getPreferenceScreen

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getPreferenceScreen(): PreferenceScreen!
```

**Deprecated:** *Deprecated in Java.*

Gets the root of the preference hierarchy that this fragment is showing.

|                                                                                                                              Return                                                                                                                               ||
|---------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen)! | The [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen) that is the root of the preference hierarchy. |

### onActivityCreated

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onActivityCreated(savedInstanceState: Bundle?): Unit
```

**Deprecated:** *Deprecated in Java.*

Called when the fragment's activity has been created and this fragment's view hierarchy instantiated. It can be used to do final initialization once these pieces are in place, such as retrieving views or restoring state. It is also useful for fragments that use [setRetainInstance(boolean)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setRetainInstance(kotlin.Boolean)) to retain their instance, as this callback tells the fragment when it is fully associated with the new activity instance. This is called after [onCreateView](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)) and before [onViewStateRestored(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onViewStateRestored(android.os.Bundle)).   
If you override this method you *must* call through to the superclass implementation.

|                                                             Parameters                                                             ||
|----------------------|--------------------------------------------------------------------------------------------------------------|
| `savedInstanceState` | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?: This value may be `null`. |

### onActivityResult

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onActivityResult(
    requestCode: Int, 
    resultCode: Int, 
    data: Intent!
): Unit
```

**Deprecated:** *Deprecated in Java.*

|                                                                                                        Parameters                                                                                                        ||
|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `requestCode` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The integer request code originally supplied to startActivityForResult(), allowing you to identify who this result came from. |
| `resultCode`  | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The integer result code returned by the child activity through its setResult().                                               |
| `data`        | [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)!: An Intent, which can return result data to the caller (various data can be attached to Intent "extras").          |

### onCreate

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onCreate(savedInstanceState: Bundle?): Unit
```

**Deprecated:** *Deprecated in Java.*

Called to do initial creation of a fragment. This is called after [onAttach(android.app.Activity)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onAttach(android.app.Activity)) and before [onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)), but is not called if the fragment instance is retained across Activity re-creation (see [setRetainInstance(boolean)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#setRetainInstance(kotlin.Boolean))).

Note that this can be called while the fragment's activity is still in the process of being created. As such, you can not rely on things like the activity's content view hierarchy being initialized at this point. If you want to do work once the activity itself is created, see [onActivityCreated(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onActivityCreated(android.os.Bundle)).

If your app's `targetSdkVersion` is [android.os.Build.VERSION_CODES#M](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#M:kotlin.Int) or lower, child fragments being restored from the savedInstanceState are restored after `onCreate` returns. When targeting [android.os.Build.VERSION_CODES#N](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#N:kotlin.Int) or above and running on an N or newer platform version they are restored by `Fragment.onCreate`.

If you override this method you *must* call through to the superclass implementation.

|                                                             Parameters                                                             ||
|----------------------|--------------------------------------------------------------------------------------------------------------|
| `savedInstanceState` | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?: This value may be `null`. |

### onCreateView

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onCreateView(
    inflater: LayoutInflater!, 
    container: ViewGroup?, 
    savedInstanceState: Bundle?
): View?
```

**Deprecated:** *Deprecated in Java.*

Called to have the fragment instantiate its user interface view. This is optional, and non-graphical fragments can return null (which is the default implementation). This will be called between [onCreate(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreate(android.os.Bundle)) and [onActivityCreated(android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onActivityCreated(android.os.Bundle)).

If you return a View from here, you will later be called in [onDestroyView](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onDestroyView()) when the view is being released.

|                                                                                                 Parameters                                                                                                  ||
|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `inflater`           | [LayoutInflater](https://developer.android.com/reference/kotlin/android/view/LayoutInflater.html#)!: The LayoutInflater object that can be used to inflate any views in the fragment, |
| `container`          | [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)?: This value may be `null`.                                                                  |
| `savedInstanceState` | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?: This value may be `null`.                                                                          |

|                                                              Return                                                              ||
|---------------------------------------------------------------------------------|-------------------------------------------------|
| [View](https://developer.android.com/reference/kotlin/android/view/View.html#)? | Return the View for the fragment's UI, or null. |

### onDestroy

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onDestroy(): Unit
```

**Deprecated:** *Deprecated in Java.*  

### onDestroyView

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onDestroyView(): Unit
```

**Deprecated:** *Deprecated in Java.*  

### onPreferenceTreeClick

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onPreferenceTreeClick(
    preferenceScreen: PreferenceScreen!, 
    preference: Preference!
): Boolean
```

**Deprecated:** *Deprecated in Java.*  

### onSaveInstanceState

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onSaveInstanceState(outState: Bundle!): Unit
```

**Deprecated:** *Deprecated in Java.*

|                                                                Parameters                                                                 ||
|------------|-------------------------------------------------------------------------------------------------------------------------------|
| `outState` | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!: Bundle in which to place your saved state. |

### onStart

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onStart(): Unit
```

**Deprecated:** *Deprecated in Java.*  

### onStop

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onStop(): Unit
```

**Deprecated:** *Deprecated in Java.*  

### onViewCreated

Added in [API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onViewCreated(
    view: View!, 
    savedInstanceState: Bundle?
): Unit
```

**Deprecated:** *Deprecated in Java.*

Called immediately after [onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)) has returned, but before any saved state has been restored in to the view. This gives subclasses a chance to initialize themselves once they know their view hierarchy has been completely created. The fragment's view hierarchy is not however attached to its parent at this point.

|                                                                                                                                                                                      Parameters                                                                                                                                                                                      ||
|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `view`               | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)!: The View returned by [onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)](https://developer.android.com/reference/kotlin/android/app/Fragment.html#onCreateView(android.view.LayoutInflater,%20android.view.ViewGroup,%20android.os.Bundle)). |
| `savedInstanceState` | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?: This value may be `null`.                                                                                                                                                                                                                                                   |

### setPreferenceScreen

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun setPreferenceScreen(preferenceScreen: PreferenceScreen!): Unit
```

**Deprecated:** *Deprecated in Java.*

Sets the root of the preference hierarchy that this fragment is showing.

|                                                                                                                                Parameters                                                                                                                                 ||
|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `preferenceScreen` | [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen)!: The root [PreferenceScreen](https://developer.android.com/reference/kotlin/android/preference/PreferenceScreen) of the preference hierarchy. |