blob: 16f6cf051b56db3e4ff24c20d92b274c57b4416c [file] [log] [blame]
<html devsite="true">
<head>
<title>ListFragment</title>
{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<h1>ListFragment</h1>
{% setvar page_path %}androidx/fragment/app/ListFragment.html{% endsetvar %}
{% setvar can_switch %}1{% endsetvar %}
{% include "reference/_kotlin_switcher2.md" %}
<p>
<pre>class ListFragment : <a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></pre>
</p>
<div class="devsite-table-wrapper">
<table class="jd-inheritance-table">
<tbody>
<tr>
<td colspan="3"><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a></td>
</tr>
<tr>
<td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
<td colspan="2"><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
<td colspan="1"><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html">ListFragment</a></td>
</tr>
</tbody>
</table>
</div>
<hr>
<p>Static library support version of the framework's android.app.ListFragment. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview.</p>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2"><h3>Public constructors</h3></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#ListFragment()">ListFragment</a>()</code></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2"><h3>Public functions</h3></th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ListAdapter?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#getListAdapter()">getListAdapter</a>()</code></div>
<p>Get the ListAdapter associated with this fragment's ListView.</p>
</td>
</tr>
<tr>
<td><code>ListView</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#getListView()">getListView</a>()</code></div>
<p>Get the fragment's list view widget.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#getSelectedItemId()">getSelectedItemId</a>()</code></div>
<p>Get the cursor row ID of the currently selected list item.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#getSelectedItemPosition()">getSelectedItemPosition</a>()</code></div>
<p>Get the position of the currently selected list item.</p>
</td>
</tr>
<tr>
<td><code>View?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)">onCreateView</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;inflater:&nbsp;LayoutInflater,<br>&nbsp;&nbsp;&nbsp;&nbsp;container:&nbsp;ViewGroup?,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>)</code></div>
<p>Provide default implementation to return a simple list view.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#onDestroyView()">onDestroyView</a>()</code></div>
<p>Detach from list view.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#onListItemClick(android.widget.ListView,android.view.View,int,long)">onListItemClick</a>(l:&nbsp;ListView,&nbsp;v:&nbsp;View,&nbsp;position:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;id:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a>)</code></div>
<p>This method will be called when an item in the list is selected.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#onViewCreated(android.view.View,android.os.Bundle)">onViewCreated</a>(view:&nbsp;View,&nbsp;savedInstanceState:&nbsp;Bundle?)</code></div>
<p>Attach to list view once the view hierarchy has been created.</p>
</td>
</tr>
<tr>
<td><code>ListAdapter</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#requireListAdapter()">requireListAdapter</a>()</code></div>
<p>Get the ListAdapter associated with this fragment's ListView.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setEmptyText(java.lang.CharSequence)">setEmptyText</a>(text:&nbsp;<a href="https://developer.android.com/reference/java/lang/CharSequence.html">CharSequence</a>?)</code></div>
<p>The default content for a ListFragment has a TextView that can be shown when the list is empty.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setListAdapter(android.widget.ListAdapter)">setListAdapter</a>(adapter:&nbsp;ListAdapter?)</code></div>
<p>Provide the cursor for the list view.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setListShown(boolean)">setListShown</a>(shown:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p>Control whether the list is being displayed.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setListShownNoAnimation(boolean)">setListShownNoAnimation</a>(shown:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p>Like <code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setListShown(boolean)">setListShown</a></code>, but no animation is used when transitioning from the previous state.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setSelection(int)">setSelection</a>(position:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
<p>Set the currently selected list item to the specified position with the adapter's data</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive" id="inhmethods">
<thead>
<tr>
<th colspan="2"><h3>Inherited functions</h3></th>
</tr>
</thead>
<tbody>
<tr>
<td><devsite-expandable><span class="expand-control">From class <a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></span>
<div class="devsite-table-wrapper">
<table class="responsive">
<tbody>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#dump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[])">dump</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;prefix:&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;fd:&nbsp;<a href="https://developer.android.com/reference/java/io/FileDescriptor.html">FileDescriptor</a>?,<br>&nbsp;&nbsp;&nbsp;&nbsp;writer:&nbsp;<a href="https://developer.android.com/reference/java/io/PrintWriter.html">PrintWriter</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;args:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html">Array</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>&gt;?<br>)</code></div>
<p>Print the Fragments's state into the given stream.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#equals(java.lang.Object)">equals</a>(o:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?)</code></div>
<p>Subclasses can not override equals().</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/FragmentActivity.html">FragmentActivity</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getActivity()">getActivity</a>()</code></div>
<p>Return the <code><a href="/reference/kotlin/androidx/fragment/app/FragmentActivity.html">FragmentActivity</a></code> this fragment is currently associated with.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getAllowEnterTransitionOverlap()">getAllowEnterTransitionOverlap</a>()</code></div>
<p>Returns whether the the exit transition and enter transition overlap or not.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getAllowReturnTransitionOverlap()">getAllowReturnTransitionOverlap</a>()</code></div>
<p>Returns whether the the return transition and reenter transition overlap or not.</p>
</td>
</tr>
<tr>
<td><code>Bundle?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getArguments()">getArguments</a>()</code></div>
<p>Return the arguments supplied when the fragment was instantiated, if any.</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getChildFragmentManager()">getChildFragmentManager</a>()</code></div>
<p>Return a private FragmentManager for placing and managing Fragments inside of this Fragment.</p>
</td>
</tr>
<tr>
<td><code>Context?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getContext()">getContext</a>()</code></div>
<p>Return the Context this fragment is currently associated with.</p>
</td>
</tr>
<tr>
<td><code>Factory</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getDefaultViewModelProviderFactory()">getDefaultViewModelProviderFactory</a>()</code></div>
<p>The <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getArguments()">Fragment's arguments</a></code> when this is first called will be used as the defaults to any androidx.lifecycle.SavedStateHandle passed to a view model created using this factory.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getEnterTransition()">getEnterTransition</a>()</code></div>
<p>Returns the Transition that will be used to move Views into the initial scene.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getExitTransition()">getExitTransition</a>()</code></div>
<p>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.</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>?</code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getFragmentManager()">getFragmentManager</a></del></span>()</code></div>
<p><strong>This function is deprecated.</strong>
<p>This has been removed in favor of <code>getParentFragmentManager()</code> which throws an <code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html">IllegalStateException</a></code> if the FragmentManager is null.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getHost()">getHost</a>()</code></div>
<p>Return the host object of this fragment.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getId()">getId</a>()</code></div>
<p>Return the identifier this fragment is known by.</p>
</td>
</tr>
<tr>
<td><code>LayoutInflater</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getLayoutInflater()">getLayoutInflater</a>()</code></div>
<p>Returns the cached LayoutInflater used to inflate Views of this Fragment.</p>
</td>
</tr>
<tr>
<td><code>Lifecycle</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getLifecycle()">getLifecycle</a>()</code></div>
<p>Overriding this method is no longer supported and this method will be made <code>final</code> in a future version of Fragment.</p>
</td>
</tr>
<tr>
<td><code>LoaderManager</code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getLoaderManager()">getLoaderManager</a></del></span>()</code></div>
<p><strong>This function is deprecated.</strong>
<p>Use LoaderManager.getInstance(this).</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getParentFragment()">getParentFragment</a>()</code></div>
<p>Returns the parent Fragment containing this Fragment.</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getParentFragmentManager()">getParentFragmentManager</a>()</code></div>
<p>Return the FragmentManager for interacting with fragments associated with this fragment's activity.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getReenterTransition()">getReenterTransition</a>()</code></div>
<p>Returns the Transition that will be used to move Views in to the scene when returning due to popping a back stack.</p>
</td>
</tr>
<tr>
<td><code>Resources</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getResources()">getResources</a>()</code></div>
<p>Return <code>requireActivity().getResources()</code>.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getRetainInstance()">getRetainInstance</a></del></span>()</code></div>
<p><strong>This function is deprecated.</strong>
<p>Instead of retaining the Fragment itself, use a non-retained Fragment and keep retained state in a ViewModel attached to that Fragment.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getReturnTransition()">getReturnTransition</a>()</code></div>
<p>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.</p>
</td>
</tr>
<tr>
<td><code>SavedStateRegistry</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getSavedStateRegistry()">getSavedStateRegistry</a>()</code></div>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getSharedElementEnterTransition()">getSharedElementEnterTransition</a>()</code></div>
<p>Returns the Transition that will be used for shared elements transferred into the content Scene.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getSharedElementReturnTransition()">getSharedElementReturnTransition</a>()</code></div>
<p>Return the Transition that will be used for shared elements transferred back during a pop of the back stack.</p>
</td>
</tr>
<tr>
<td><code><a href="https://developer.android.com/reference/java/lang/String.html">String</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getString(int)">getString</a>(resId:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
<p>Return a localized string from the application's package's default string table.</p>
</td>
</tr>
<tr>
<td><code><a href="https://developer.android.com/reference/java/lang/String.html">String</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getString(int,java.lang.Object...)">getString</a>(resId:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;formatArgs:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html">Array</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>&gt;?)</code></div>
<p>Return a localized formatted string from the application's package's default string table, substituting the format arguments as defined in <code><a href="https://developer.android.com/reference/java/util/Formatter.html">java.util.Formatter</a></code> and format.</p>
</td>
</tr>
<tr>
<td><code><a href="https://developer.android.com/reference/java/lang/String.html">String</a>?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getTag()">getTag</a>()</code></div>
<p>Get the tag name of the fragment, if specified.</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>?</code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getTargetFragment()">getTargetFragment</a></del></span>()</code></div>
<p><strong>This function is deprecated.</strong>
<p>Instead of using a target fragment to pass results, use <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#setFragmentResult(java.lang.String,android.os.Bundle)">FragmentManager#setFragmentResult(String, Bundle)</a></code> to deliver results to <code><a href="/reference/kotlin/androidx/fragment/app/FragmentResultListener.html">FragmentResultListener</a></code> instances registered by other fragments via <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#setFragmentResultListener(java.lang.String,androidx.lifecycle.LifecycleOwner,androidx.fragment.app.FragmentResultListener)">FragmentManager#setFragmentResultListener(String, LifecycleOwner, FragmentResultListener)</a></code>.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getTargetRequestCode()">getTargetRequestCode</a></del></span>()</code></div>
<p><strong>This function is deprecated.</strong>
<p>When using the target fragment replacement of <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#setFragmentResultListener(java.lang.String,androidx.lifecycle.LifecycleOwner,androidx.fragment.app.FragmentResultListener)">FragmentManager#setFragmentResultListener(String, LifecycleOwner, FragmentResultListener)</a></code> and <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#setFragmentResult(java.lang.String,android.os.Bundle)">FragmentManager#setFragmentResult(String, Bundle)</a></code>, consider using <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setArguments(android.os.Bundle)">setArguments</a></code> to pass a <code>{@code requestKey}</code> if you need to support dynamic request keys.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://developer.android.com/reference/java/lang/CharSequence.html">CharSequence</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getText(int)">getText</a>(resId:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
<p>Return a localized, styled CharSequence from the application's package's default string table.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getUserVisibleHint()">getUserVisibleHint</a></del></span>()</code></div>
<p><strong>This function is deprecated.</strong>
<p>Use <code><a href="/reference/kotlin/androidx/fragment/app/FragmentTransaction.html#setMaxLifecycle(androidx.fragment.app.Fragment,androidx.lifecycle.Lifecycle.State)">FragmentTransaction#setMaxLifecycle(Fragment, Lifecycle.State)</a></code> instead.</p>
</p>
</td>
</tr>
<tr>
<td><code>View?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getView()">getView</a>()</code></div>
<p>Get the root view for the fragment's layout (the one returned by <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)">onCreateView</a></code>), if provided.</p>
</td>
</tr>
<tr>
<td><code>LifecycleOwner</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getViewLifecycleOwner()">getViewLifecycleOwner</a>()</code></div>
<p>Get a LifecycleOwner that represents the <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getView()">Fragment's View</a></code> lifecycle.</p>
</td>
</tr>
<tr>
<td><code>LiveData&lt;LifecycleOwner&gt;</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getViewLifecycleOwnerLiveData()">getViewLifecycleOwnerLiveData</a>()</code></div>
<p>Retrieve a LiveData which allows you to observe the <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getViewLifecycleOwner()">lifecycle of the Fragment's View</a></code>.</p>
</td>
</tr>
<tr>
<td><code>ViewModelStore</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getViewModelStore()">getViewModelStore</a>()</code></div>
<p>Returns the ViewModelStore associated with this Fragment </p>
<p>Overriding this method is no longer supported and this method will be made <code>final</code> in a future version of Fragment.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#hashCode()">hashCode</a>()</code></div>
<p>Subclasses can not override hashCode().</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#instantiate(android.content.Context,java.lang.String)">instantiate</a></del></span>(context:&nbsp;Context,&nbsp;fname:&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>Use <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#getFragmentFactory()">FragmentManager#getFragmentFactory()</a></code> and <code><a href="/reference/kotlin/androidx/fragment/app/FragmentFactory.html#instantiate(java.lang.ClassLoader,java.lang.String)">FragmentFactory#instantiate(ClassLoader, String)</a></code></p>
</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#instantiate(android.content.Context,java.lang.String,android.os.Bundle)">instantiate</a></del></span>(context:&nbsp;Context,&nbsp;fname:&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>,&nbsp;args:&nbsp;Bundle?)</code></div>
<p><strong>This function is deprecated.</strong>
<p>Use <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#getFragmentFactory()">FragmentManager#getFragmentFactory()</a></code> and <code><a href="/reference/kotlin/androidx/fragment/app/FragmentFactory.html#instantiate(java.lang.ClassLoader,java.lang.String)">FragmentFactory#instantiate(ClassLoader, String)</a></code>, manually calling <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setArguments(android.os.Bundle)">setArguments</a></code> on the returned Fragment.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#isAdded()">isAdded</a>()</code></div>
<p>Return true if the fragment is currently added to its activity.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#isDetached()">isDetached</a>()</code></div>
<p>Return true if the fragment has been explicitly detached from the UI.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#isHidden()">isHidden</a>()</code></div>
<p>Return true if the fragment has been hidden.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#isInLayout()">isInLayout</a>()</code></div>
<p>Return true if the layout is included as part of an activity view hierarchy via the &lt;fragment&gt; tag.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#isRemoving()">isRemoving</a>()</code></div>
<p>Return true if this fragment is currently being removed from its activity.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#isResumed()">isResumed</a>()</code></div>
<p>Return true if the fragment is in the resumed state.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#isStateSaved()">isStateSaved</a>()</code></div>
<p>Returns true if this fragment is added and its state has already been saved by its host.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#isVisible()">isVisible</a>()</code></div>
<p>Return true if the fragment is currently visible to the user.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onActivityCreated(android.os.Bundle)">onActivityCreated</a></del></span>(savedInstanceState:&nbsp;Bundle?)</code></div>
<p><strong>This function is deprecated.</strong>
<p>use <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onViewCreated(android.view.View,android.os.Bundle)">onViewCreated</a></code> for code touching the Fragment's view and <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreate(android.os.Bundle)">onCreate</a></code> for other initialization.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onActivityResult(int,int,android.content.Intent)">onActivityResult</a></del></span>(requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;resultCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;data:&nbsp;Intent?)</code></div>
<p><strong>This function is deprecated.</strong>
<p>use <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract&lt;I,O&gt;,androidx.activity.result.ActivityResultCallback&lt;O&gt;)">registerForActivityResult</a></code> with the appropriate ActivityResultContract and handling the result in the callback.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onAttach(android.content.Context)">onAttach</a>(context:&nbsp;Context)</code></div>
<p>Called when a fragment is first attached to its context.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onAttach(android.app.Activity)">onAttach</a></del></span>(activity:&nbsp;Activity)</code></div>
<p><strong>This function is deprecated.</strong>
<p>See <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onAttach(android.content.Context)">onAttach</a></code>.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onAttachFragment(androidx.fragment.app.Fragment)">onAttachFragment</a></del></span>(childFragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>The responsibility for listening for fragments being attached has been moved to FragmentManager.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onConfigurationChanged(android.content.res.Configuration)">onConfigurationChanged</a>(newConfig:&nbsp;Configuration)</code></div>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onContextItemSelected(android.view.MenuItem)">onContextItemSelected</a>(item:&nbsp;MenuItem)</code></div>
<p>This hook is called whenever an item in a context menu is selected.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreate(android.os.Bundle)">onCreate</a>(savedInstanceState:&nbsp;Bundle?)</code></div>
<p>Called to do initial creation of a fragment.</p>
</td>
</tr>
<tr>
<td><code>Animation?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreateAnimation(int,boolean,int)">onCreateAnimation</a>(transit:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;enter:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>,&nbsp;nextAnim:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
<p>Called when a fragment loads an animation.</p>
</td>
</tr>
<tr>
<td><code>Animator?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreateAnimator(int,boolean,int)">onCreateAnimator</a>(transit:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;enter:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>,&nbsp;nextAnim:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
<p>Called when a fragment loads an animator.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreateContextMenu(android.view.ContextMenu,android.view.View,android.view.ContextMenu.ContextMenuInfo)">onCreateContextMenu</a>(menu:&nbsp;ContextMenu,&nbsp;v:&nbsp;View,&nbsp;menuInfo:&nbsp;ContextMenuInfo?)</code></div>
<p>Called when a context menu for the <code>{@code view}</code> is about to be shown.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreateOptionsMenu(android.view.Menu,android.view.MenuInflater)">onCreateOptionsMenu</a>(menu:&nbsp;Menu,&nbsp;inflater:&nbsp;MenuInflater)</code></div>
<p>Initialize the contents of the Fragment host's standard options menu.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onDestroy()">onDestroy</a>()</code></div>
<p>Called when the fragment is no longer in use.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onDestroyOptionsMenu()">onDestroyOptionsMenu</a>()</code></div>
<p>Called when this fragment's option menu items are no longer being included in the overall options menu.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onDetach()">onDetach</a>()</code></div>
<p>Called when the fragment is no longer attached to its activity.</p>
</td>
</tr>
<tr>
<td><code>LayoutInflater</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onGetLayoutInflater(android.os.Bundle)">onGetLayoutInflater</a>(savedInstanceState:&nbsp;Bundle?)</code></div>
<p>Returns the LayoutInflater used to inflate Views of this Fragment.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onHiddenChanged(boolean)">onHiddenChanged</a>(hidden:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p>Called when the hidden state (as returned by <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#isHidden()">isHidden</a></code> of the fragment has changed.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onInflate(android.content.Context,android.util.AttributeSet,android.os.Bundle)">onInflate</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;context:&nbsp;Context,<br>&nbsp;&nbsp;&nbsp;&nbsp;attrs:&nbsp;AttributeSet,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>)</code></div>
<p>Called when a fragment is being created as part of a view layout inflation, typically from setting the content view of an activity.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onInflate(android.app.Activity,android.util.AttributeSet,android.os.Bundle)">onInflate</a></del></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;activity:&nbsp;Activity,<br>&nbsp;&nbsp;&nbsp;&nbsp;attrs:&nbsp;AttributeSet,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>See <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onInflate(android.content.Context,android.util.AttributeSet,android.os.Bundle)">onInflate</a></code>.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onLowMemory()">onLowMemory</a>()</code></div>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onMultiWindowModeChanged(boolean)">onMultiWindowModeChanged</a>(isInMultiWindowMode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p>Called when the Fragment's activity changes from fullscreen mode to multi-window mode and visa-versa.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onOptionsItemSelected(android.view.MenuItem)">onOptionsItemSelected</a>(item:&nbsp;MenuItem)</code></div>
<p>This hook is called whenever an item in your options menu is selected.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onOptionsMenuClosed(android.view.Menu)">onOptionsMenuClosed</a>(menu:&nbsp;Menu)</code></div>
<p>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).</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onPause()">onPause</a>()</code></div>
<p>Called when the Fragment is no longer resumed.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onPictureInPictureModeChanged(boolean)">onPictureInPictureModeChanged</a>(isInPictureInPictureMode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p>Called by the system when the activity changes to and from picture-in-picture mode.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onPrepareOptionsMenu(android.view.Menu)">onPrepareOptionsMenu</a>(menu:&nbsp;Menu)</code></div>
<p>Prepare the Fragment host's standard options menu to be displayed.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onPrimaryNavigationFragmentChanged(boolean)">onPrimaryNavigationFragmentChanged</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;isPrimaryNavigationFragment:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a><br>)</code></div>
<p>Callback for when the primary navigation state of this Fragment has changed.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onRequestPermissionsResult(int,java.lang.String[],int[])">onRequestPermissionsResult</a></del></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;permissions:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html">Array</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;grantResults:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html">Array</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>&gt;<br>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>use <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract&lt;I,O&gt;,androidx.activity.result.ActivityResultCallback&lt;O&gt;)">registerForActivityResult</a></code> passing in a RequestMultiplePermissions object for the ActivityResultContract and handling the result in the callback.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onResume()">onResume</a>()</code></div>
<p>Called when the fragment is visible to the user and actively running.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onSaveInstanceState(android.os.Bundle)">onSaveInstanceState</a>(outState:&nbsp;Bundle)</code></div>
<p>Called to ask the fragment to save its current dynamic state, so it can later be reconstructed in a new instance if its process is restarted.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onStart()">onStart</a>()</code></div>
<p>Called when the Fragment is visible to the user.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onStop()">onStop</a>()</code></div>
<p>Called when the Fragment is no longer started.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onViewStateRestored(android.os.Bundle)">onViewStateRestored</a>(savedInstanceState:&nbsp;Bundle?)</code></div>
<p>Called when all saved state has been restored into the view hierarchy of the fragment.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#postponeEnterTransition()">postponeEnterTransition</a>()</code></div>
<p>Postpone the entering Fragment transition until <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#startPostponedEnterTransition()">startPostponedEnterTransition</a></code> or <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#executePendingTransactions()">FragmentManager#executePendingTransactions()</a></code> has been called.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#postponeEnterTransition(long,java.util.concurrent.TimeUnit)">postponeEnterTransition</a>(duration:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a>,&nbsp;timeUnit:&nbsp;<a href="https://developer.android.com/reference/java/util/concurrent/TimeUnit.html">TimeUnit</a>)</code></div>
<p>Postpone the entering Fragment transition for a given amount of time and then call <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#startPostponedEnterTransition()">startPostponedEnterTransition</a></code>.</p>
</td>
</tr>
<tr>
<td><code>ActivityResultLauncher&lt;I&gt;</code></td>
<td width="100%">
<div><code>&lt;I,&nbsp;O&gt; <a href="/reference/kotlin/androidx/fragment/app/Fragment.html#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract&lt;I,O&gt;,androidx.activity.result.ActivityResultCallback&lt;O&gt;)">registerForActivityResult</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;contract:&nbsp;ActivityResultContract&lt;I, O&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;callback:&nbsp;ActivityResultCallback&lt;O&gt;<br>)</code></div>
<p>If the host of this fragment is an ActivityResultRegistryOwner the ActivityResultRegistry of the host will be used.</p>
</td>
</tr>
<tr>
<td><code>ActivityResultLauncher&lt;I&gt;</code></td>
<td width="100%">
<div><code>&lt;I,&nbsp;O&gt; <a href="/reference/kotlin/androidx/fragment/app/Fragment.html#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract&lt;I,O&gt;,androidx.activity.result.ActivityResultRegistry,androidx.activity.result.ActivityResultCallback&lt;O&gt;)">registerForActivityResult</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;contract:&nbsp;ActivityResultContract&lt;I, O&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;registry:&nbsp;ActivityResultRegistry,<br>&nbsp;&nbsp;&nbsp;&nbsp;callback:&nbsp;ActivityResultCallback&lt;O&gt;<br>)</code></div>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#registerForContextMenu(android.view.View)">registerForContextMenu</a>(view:&nbsp;View)</code></div>
<p>Registers a context menu to be shown for the given view (multiple views can show the context menu).</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#requestPermissions(java.lang.String[],int)">requestPermissions</a></del></span>(permissions:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html">Array</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>&gt;,&nbsp;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>use <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract&lt;I,O&gt;,androidx.activity.result.ActivityResultCallback&lt;O&gt;)">registerForActivityResult</a></code> passing in a RequestMultiplePermissions object for the ActivityResultContract and handling the result in the callback.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/FragmentActivity.html">FragmentActivity</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#requireActivity()">requireActivity</a>()</code></div>
<p>Return the <code><a href="/reference/kotlin/androidx/fragment/app/FragmentActivity.html">FragmentActivity</a></code> this fragment is currently associated with.</p>
</td>
</tr>
<tr>
<td><code>Bundle</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#requireArguments()">requireArguments</a>()</code></div>
<p>Return the arguments supplied when the fragment was instantiated.</p>
</td>
</tr>
<tr>
<td><code>Context</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#requireContext()">requireContext</a>()</code></div>
<p>Return the Context this fragment is currently associated with.</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#requireFragmentManager()">requireFragmentManager</a></del></span>()</code></div>
<p><strong>This function is deprecated.</strong>
<p>This has been renamed to <code>getParentFragmentManager()</code> to make it clear that you are accessing the FragmentManager that contains this Fragment and not the FragmentManager associated with child Fragments.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#requireHost()">requireHost</a>()</code></div>
<p>Return the host object of this fragment.</p>
</td>
</tr>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#requireParentFragment()">requireParentFragment</a>()</code></div>
<p>Returns the parent Fragment containing this Fragment.</p>
</td>
</tr>
<tr>
<td><code>View</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#requireView()">requireView</a>()</code></div>
<p>Get the root view for the fragment's layout (the one returned by <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)">onCreateView</a></code>).</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setAllowEnterTransitionOverlap(boolean)">setAllowEnterTransitionOverlap</a>(allow:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p>Sets whether the the exit transition and enter transition overlap or not.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setAllowReturnTransitionOverlap(boolean)">setAllowReturnTransitionOverlap</a>(allow:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p>Sets whether the the return transition and reenter transition overlap or not.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setArguments(android.os.Bundle)">setArguments</a>(args:&nbsp;Bundle?)</code></div>
<p>Supply the construction arguments for this fragment.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setEnterSharedElementCallback(androidx.core.app.SharedElementCallback)">setEnterSharedElementCallback</a>(callback:&nbsp;SharedElementCallback?)</code></div>
<p>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.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setEnterTransition(java.lang.Object)">setEnterTransition</a>(transition:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?)</code></div>
<p>Sets the Transition that will be used to move Views into the initial scene.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setExitSharedElementCallback(androidx.core.app.SharedElementCallback)">setExitSharedElementCallback</a>(callback:&nbsp;SharedElementCallback?)</code></div>
<p>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.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setExitTransition(java.lang.Object)">setExitTransition</a>(transition:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?)</code></div>
<p>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.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setHasOptionsMenu(boolean)">setHasOptionsMenu</a>(hasMenu:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p>Report that this fragment would like to participate in populating the options menu by receiving a call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreateOptionsMenu(android.view.Menu,android.view.MenuInflater)">onCreateOptionsMenu</a></code> and related methods.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setInitialSavedState(androidx.fragment.app.Fragment.SavedState)">setInitialSavedState</a>(state:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.SavedState.html">Fragment.SavedState</a>?)</code></div>
<p>Set the initial saved state that this Fragment should restore itself from when first being constructed, as returned by <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#saveFragmentInstanceState(androidx.fragment.app.Fragment)">FragmentManager.saveFragmentInstanceState</a></code>.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setMenuVisibility(boolean)">setMenuVisibility</a>(menuVisible:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p>Set a hint for whether this fragment's menu should be visible.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setReenterTransition(java.lang.Object)">setReenterTransition</a>(transition:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?)</code></div>
<p>Sets the Transition that will be used to move Views in to the scene when returning due to popping a back stack.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setRetainInstance(boolean)">setRetainInstance</a></del></span>(retain:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>Instead of retaining the Fragment itself, use a non-retained Fragment and keep retained state in a ViewModel attached to that Fragment.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setReturnTransition(java.lang.Object)">setReturnTransition</a>(transition:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?)</code></div>
<p>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.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setSharedElementEnterTransition(java.lang.Object)">setSharedElementEnterTransition</a>(transition:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?)</code></div>
<p>Sets the Transition that will be used for shared elements transferred into the content Scene.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setSharedElementReturnTransition(java.lang.Object)">setSharedElementReturnTransition</a>(transition:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>?)</code></div>
<p>Sets the Transition that will be used for shared elements transferred back during a pop of the back stack.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setTargetFragment(androidx.fragment.app.Fragment,int)">setTargetFragment</a></del></span>(fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>?,&nbsp;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>Instead of using a target fragment to pass results, the fragment requesting a result should use <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#setFragmentResultListener(java.lang.String,androidx.lifecycle.LifecycleOwner,androidx.fragment.app.FragmentResultListener)">FragmentManager#setFragmentResultListener(String, LifecycleOwner, FragmentResultListener)</a></code> to register a <code><a href="/reference/kotlin/androidx/fragment/app/FragmentResultListener.html">FragmentResultListener</a></code> with a <code>{@code * requestKey}</code> using its <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getParentFragmentManager()">parent fragment manager</a></code>.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#setUserVisibleHint(boolean)">setUserVisibleHint</a></del></span>(isVisibleToUser:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>If you are manually calling this method, use <code><a href="/reference/kotlin/androidx/fragment/app/FragmentTransaction.html#setMaxLifecycle(androidx.fragment.app.Fragment,androidx.lifecycle.Lifecycle.State)">FragmentTransaction#setMaxLifecycle(Fragment, Lifecycle.State)</a></code> instead.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#shouldShowRequestPermissionRationale(java.lang.String)">shouldShowRequestPermissionRationale</a>(permission:&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>)</code></div>
<p>Gets whether you should show UI with rationale before requesting a permission.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#startActivity(android.content.Intent)">startActivity</a>(intent:&nbsp;Intent)</code></div>
<p>Call Activity#startActivity(Intent) from the fragment's containing Activity.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#startActivity(android.content.Intent,android.os.Bundle)">startActivity</a>(intent:&nbsp;Intent,&nbsp;options:&nbsp;Bundle?)</code></div>
<p>Call Activity#startActivity(Intent, Bundle) from the fragment's containing Activity.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#startActivityForResult(android.content.Intent,int)">startActivityForResult</a></del></span>(intent:&nbsp;Intent,&nbsp;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>use <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract&lt;I,O&gt;,androidx.activity.result.ActivityResultCallback&lt;O&gt;)">registerForActivityResult</a></code> passing in a StartActivityForResult object for the ActivityResultContract.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#startActivityForResult(android.content.Intent,int,android.os.Bundle)">startActivityForResult</a></del></span>(intent:&nbsp;Intent,&nbsp;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;options:&nbsp;Bundle?)</code></div>
<p><strong>This function is deprecated.</strong>
<p>use <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract&lt;I,O&gt;,androidx.activity.result.ActivityResultCallback&lt;O&gt;)">registerForActivityResult</a></code> passing in a StartActivityForResult object for the ActivityResultContract.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><span><del><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#startIntentSenderForResult(android.content.IntentSender,int,android.content.Intent,int,int,int,android.os.Bundle)">startIntentSenderForResult</a></del></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;intent:&nbsp;IntentSender,<br>&nbsp;&nbsp;&nbsp;&nbsp;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;fillInIntent:&nbsp;Intent?,<br>&nbsp;&nbsp;&nbsp;&nbsp;flagsMask:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;flagsValues:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;extraFlags:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;options:&nbsp;Bundle?<br>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>use <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract&lt;I,O&gt;,androidx.activity.result.ActivityResultCallback&lt;O&gt;)">registerForActivityResult</a></code> passing in a StartIntentSenderForResult object for the ActivityResultContract.</p>
</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#startPostponedEnterTransition()">startPostponedEnterTransition</a>()</code></div>
<p>Begin postponed transitions after <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#postponeEnterTransition()">postponeEnterTransition</a></code> was called.</p>
</td>
</tr>
<tr>
<td><code><a href="https://developer.android.com/reference/java/lang/String.html">String</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#toString()">toString</a>()</code></div>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#unregisterForContextMenu(android.view.View)">unregisterForContextMenu</a>(view:&nbsp;View)</code></div>
<p>Prevents a context menu to be shown for the given view.</p>
</td>
</tr>
</tbody>
</table>
</div>
</devsite-expandable> </td>
</tr>
</tbody>
</table>
</div>
<h2>Public constructors</h2>
<div><a name="ListFragment--"></a>
<h3 class="api-name" id="ListFragment()">ListFragment</h3>
<pre class="api-signature no-pretty-print"><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#ListFragment()">ListFragment</a>()</pre>
</div>
<h2>Public functions</h2>
<div><a name="getListAdapter--"></a>
<h3 class="api-name" id="getListAdapter()">getListAdapter</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#getListAdapter()">getListAdapter</a>():&nbsp;ListAdapter?</pre>
<p>Get the ListAdapter associated with this fragment's ListView.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">See also</th>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#requireListAdapter()">requireListAdapter</a></code></td>
<td width="100%">
<p>#requireListAdapter()</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="getListView--"></a>
<h3 class="api-name" id="getListView()">getListView</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#getListView()">getListView</a>():&nbsp;ListView</pre>
<p>Get the fragment's list view widget.</p>
</div>
<div><a name="getSelectedItemId--"></a>
<h3 class="api-name" id="getSelectedItemId()">getSelectedItemId</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#getSelectedItemId()">getSelectedItemId</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a></pre>
<p>Get the cursor row ID of the currently selected list item.</p>
</div>
<div><a name="getSelectedItemPosition--"></a>
<h3 class="api-name" id="getSelectedItemPosition()">getSelectedItemPosition</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#getSelectedItemPosition()">getSelectedItemPosition</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
<p>Get the position of the currently selected list item.</p>
</div>
<div><a name="onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)"></a><a name="onCreateView-android.view.LayoutInflater-android.view.ViewGroup-android.os.Bundle-"></a>
<h3 class="api-name" id="onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)">onCreateView</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)">onCreateView</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;inflater:&nbsp;LayoutInflater,<br>&nbsp;&nbsp;&nbsp;&nbsp;container:&nbsp;ViewGroup?,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>):&nbsp;View?</pre>
<p>Provide default implementation to return a simple list view. Subclasses can override to replace with their own layout. If doing so, the returned view hierarchy <em>must</em> have a ListView whose id is android.R.id.list and can optionally have a sibling view id android.R.id.empty that is to be shown when the list is empty. </p>
<p>If you are overriding this method with your own custom content, consider including the standard layout list_content in your layout file, so that you continue to retain all of the standard behavior of ListFragment. In particular, this is currently the only way to have the built-in indeterminant progress state be shown.</p>
</div>
<div><a name="onDestroyView--"></a>
<h3 class="api-name" id="onDestroyView()">onDestroyView</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#onDestroyView()">onDestroyView</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Detach from list view.</p>
</div>
<div><a name="onListItemClick(android.widget.ListView, android.view.View, int, long)"></a><a name="onListItemClick-android.widget.ListView-android.view.View-int-long-"></a>
<h3 class="api-name" id="onListItemClick(android.widget.ListView,android.view.View,int,long)">onListItemClick</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#onListItemClick(android.widget.ListView,android.view.View,int,long)">onListItemClick</a>(l:&nbsp;ListView,&nbsp;v:&nbsp;View,&nbsp;position:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;id:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>This method will be called when an item in the list is selected. Subclasses should override. Subclasses can call getListView().getItemAtPosition(position) if they need to access the data associated with the selected item.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>l:&nbsp;ListView</code></td>
<td width="100%">
<p>The ListView where the click happened</p>
</td>
</tr>
<tr>
<td><code>v:&nbsp;View</code></td>
<td width="100%">
<p>The view that was clicked within the ListView</p>
</td>
</tr>
<tr>
<td><code>position:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
<td width="100%">
<p>The position of the view in the list</p>
</td>
</tr>
<tr>
<td><code>id:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a></code></td>
<td width="100%">
<p>The row id of the item that was clicked</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onViewCreated(android.view.View, android.os.Bundle)"></a><a name="onViewCreated-android.view.View-android.os.Bundle-"></a>
<h3 class="api-name" id="onViewCreated(android.view.View,android.os.Bundle)">onViewCreated</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#onViewCreated(android.view.View,android.os.Bundle)">onViewCreated</a>(view:&nbsp;View,&nbsp;savedInstanceState:&nbsp;Bundle?):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Attach to list view once the view hierarchy has been created.</p>
</div>
<div><a name="requireListAdapter--"></a>
<h3 class="api-name" id="requireListAdapter()">requireListAdapter</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#requireListAdapter()">requireListAdapter</a>():&nbsp;ListAdapter</pre>
<p>Get the ListAdapter associated with this fragment's ListView.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Throws</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>java.lang.IllegalStateException</code></td>
<td width="100%">
<p>if no ListAdapter has been set.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">See also</th>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#getListAdapter()">getListAdapter</a></code></td>
<td width="100%">
<p>#getListAdapter()</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="setEmptyText-java.lang.CharSequence-"></a>
<h3 class="api-name" id="setEmptyText(java.lang.CharSequence)">setEmptyText</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setEmptyText(java.lang.CharSequence)">setEmptyText</a>(text:&nbsp;<a href="https://developer.android.com/reference/java/lang/CharSequence.html">CharSequence</a>?):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>The default content for a ListFragment has a TextView that can be shown when the list is empty. If you would like to have it shown, call this method to supply the text it should use.</p>
</div>
<div><a name="setListAdapter-android.widget.ListAdapter-"></a>
<h3 class="api-name" id="setListAdapter(android.widget.ListAdapter)">setListAdapter</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setListAdapter(android.widget.ListAdapter)">setListAdapter</a>(adapter:&nbsp;ListAdapter?):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Provide the cursor for the list view.</p>
</div>
<div><a name="setListShown-boolean-"></a>
<h3 class="api-name" id="setListShown(boolean)">setListShown</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setListShown(boolean)">setListShown</a>(shown:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Control whether the list is being displayed. You can make it not displayed if you are waiting for the initial data to show in it. During this time an indeterminant progress indicator will be shown instead. </p>
<p>Applications do not normally need to use this themselves. The default behavior of ListFragment is to start with the list not being shown, only showing it once an adapter is given with <code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setListAdapter(android.widget.ListAdapter)">setListAdapter</a></code>. If the list at that point had not been shown, when it does get shown it will be do without the user ever seeing the hidden state.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>shown:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td>
<td width="100%">
<p>If true, the list view is shown; if false, the progress indicator. The initial value is true.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="setListShownNoAnimation-boolean-"></a>
<h3 class="api-name" id="setListShownNoAnimation(boolean)">setListShownNoAnimation</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setListShownNoAnimation(boolean)">setListShownNoAnimation</a>(shown:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Like <code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setListShown(boolean)">setListShown</a></code>, but no animation is used when transitioning from the previous state.</p>
</div>
<div><a name="setSelection-int-"></a>
<h3 class="api-name" id="setSelection(int)">setSelection</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/ListFragment.html#setSelection(int)">setSelection</a>(position:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Set the currently selected list item to the specified position with the adapter's data</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>position:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
<td width="100%"></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>