blob: 08c4aab34350bc0e3c9c256ea13e592f3812cc3d [file] [log] [blame]
<html devsite="true">
<head>
<title>androidx.fragment.app</title>
{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<h1>androidx.fragment.app</h1>
<h2>Interfaces</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<tbody class="list">
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.BackStackEntry.html">FragmentManager.BackStackEntry</a></code></td>
<td>
<p>Representation of an entry on the fragment back stack, as created with <code><a href="/reference/kotlin/androidx/fragment/app/FragmentTransaction.html#addToBackStack(java.lang.String)">FragmentTransaction.addToBackStack()</a></code>.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.OnBackStackChangedListener.html">FragmentManager.OnBackStackChangedListener</a></code></td>
<td>
<p>Interface to watch for changes to the back stack.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentOnAttachListener.html">FragmentOnAttachListener</a></code></td>
<td>
<p>Listener for receiving a callback immediately following <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onAttach(android.content.Context)">onAttach</a></code>.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentResultListener.html">FragmentResultListener</a></code></td>
<td>
<p>Listener for handling fragment results.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentResultOwner.html">FragmentResultOwner</a></code></td>
<td>
<p>A class that manages passing data between fragments.</p>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Classes</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<tbody class="list">
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/DialogFragment.html">DialogFragment</a></code></td>
<td>
<p>Static library support version of the framework's <code><a href="https://developer.android.com/reference/android/app/DialogFragment.html">android.app.DialogFragment</a></code>.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td>
<p>Static library support version of the framework's <code><a href="https://developer.android.com/reference/android/app/Fragment.html">android.app.Fragment</a></code>.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.SavedState.html">Fragment.SavedState</a></code></td>
<td>
<p>State information that has been retrieved from a fragment instance through <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#saveFragmentInstanceState(androidx.fragment.app.Fragment)">FragmentManager.saveFragmentInstanceState</a></code>.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentActivity.html">FragmentActivity</a></code></td>
<td>
<p>Base class for activities that want to use the support-based <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragments</a></code>.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentContainer.html">FragmentContainer</a></code></td>
<td>
<p>Callbacks to a <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code>'s container.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentContainerView.html">FragmentContainerView</a></code></td>
<td>
<p>FragmentContainerView is a customized Layout designed specifically for Fragments.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentController.html">FragmentController</a></code></td>
<td>
<p>Provides integration points with a <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code> for a fragment host.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentFactory.html">FragmentFactory</a></code></td>
<td>
<p>Interface used to control the instantiation of <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code> instances.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html">FragmentHostCallback</a></code></td>
<td>
<p>Integration points with the Fragment host.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td>
<p>Static library support version of the framework's <code><a href="https://developer.android.com/reference/android/app/FragmentManager.html">android.app.FragmentManager</a></code>.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html">FragmentManager.FragmentLifecycleCallbacks</a></code></td>
<td>
<p>Callback interface for listening to fragment state changes that happen within a given FragmentManager.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentManagerNonConfig.html">FragmentManagerNonConfig</a></code></td>
<td>
<p><strong>This class is deprecated.</strong>
<p>Have your <code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html">FragmentHostCallback</a></code> implement <code><a href="/reference/kotlin/androidx/lifecycle/ViewModelStoreOwner.html">androidx.lifecycle.ViewModelStoreOwner</a></code> to automatically retain the Fragment's non configuration state.</p>
</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentPagerAdapter.html">FragmentPagerAdapter</a></code></td>
<td>
<p><strong>This class is deprecated.</strong>
<p>Switch to androidx.viewpager2.widget.ViewPager2 and use androidx.viewpager2.adapter.FragmentStateAdapter instead.</p>
</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentStatePagerAdapter.html">FragmentStatePagerAdapter</a></code></td>
<td>
<p><strong>This class is deprecated.</strong>
<p>Switch to androidx.viewpager2.widget.ViewPager2 and use androidx.viewpager2.adapter.FragmentStateAdapter instead.</p>
</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentTabHost.html">FragmentTabHost</a></code></td>
<td>
<p><strong>This class is deprecated.</strong>
<p>Use <a href="https://developer.android.com/guide/navigation/navigation-swipe-view ">TabLayout and ViewPager</a> instead.</p>
</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/FragmentTransaction.html">FragmentTransaction</a></code></td>
<td>
<p>Static library support version of the framework's <code><a href="https://developer.android.com/reference/android/app/FragmentTransaction.html">android.app.FragmentTransaction</a></code>.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/ListFragment.html">ListFragment</a></code></td>
<td>
<p>Static library support version of the framework's <code><a href="https://developer.android.com/reference/android/app/ListFragment.html">android.app.ListFragment</a></code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Exceptions</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<tbody class="list">
<tr>
<td width="40%"><code><a href="/reference/kotlin/androidx/fragment/app/Fragment.InstantiationException.html">Fragment.InstantiationException</a></code></td>
<td>
<p>Thrown by <code><a href="/reference/kotlin/androidx/fragment/app/FragmentFactory.html#instantiate(java.lang.ClassLoader,java.lang.String)">instantiate</a></code> when there is an instantiation failure.</p>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>