blob: 933f2f3e146866a155f937fd21b5f08b2e0f6a67 [file] [log] [blame]
<html devsite="true">
<head>
<title>FragmentManager.FragmentLifecycleCallbacks</title>
{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<h1>FragmentManager.FragmentLifecycleCallbacks</h1>
{% setvar page_path %}androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html{% endsetvar %}
{% setvar can_switch %}1{% endsetvar %}
{% include "reference/_kotlin_switcher2.md" %}
<p>
<pre>abstract class FragmentManager.FragmentLifecycleCallbacks</pre>
</p>
<hr>
<p>Callback interface for listening to fragment state changes that happen within a given FragmentManager.</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/FragmentManager.FragmentLifecycleCallbacks.html#FragmentLifecycleCallbacks()">FragmentLifecycleCallbacks</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><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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentActivityCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentActivityCreated</a></del></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>To get a callback specifically when a Fragment activity's onCreate is called, register a androidx.lifecycle.LifecycleObserver on the Activity's Lifecycle in <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentAttached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.content.Context)">onFragmentAttached</a></code>, removing it when it receives the Lifecycle.State#CREATED 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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentAttached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.content.Context)">onFragmentAttached</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,&nbsp;context:&nbsp;Context)</code></div>
<p>Called after the fragment has been attached to its host.</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentCreated</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>)</code></div>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreate(android.os.Bundle)">Fragment#onCreate(Bundle)</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentDestroyed(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentDestroyed</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>)</code></div>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onDestroy()">Fragment#onDestroy()</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentDetached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentDetached</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>)</code></div>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onDetach()">Fragment#onDetach()</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentPaused(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentPaused</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>)</code></div>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onPause()">Fragment#onPause()</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentPreAttached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.content.Context)">onFragmentPreAttached</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,&nbsp;context:&nbsp;Context)</code></div>
<p>Called right before the fragment's <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onAttach(android.content.Context)">Fragment#onAttach(Context)</a></code> method is 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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentPreCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentPreCreated</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>)</code></div>
<p>Called right before the fragment's <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreate(android.os.Bundle)">Fragment#onCreate(Bundle)</a></code> method is 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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentResumed(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentResumed</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>)</code></div>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onResume()">Fragment#onResume()</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentSaveInstanceState(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentSaveInstanceState</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;outState:&nbsp;Bundle<br>)</code></div>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onSaveInstanceState(android.os.Bundle)">Fragment#onSaveInstanceState(Bundle)</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentStarted(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentStarted</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>)</code></div>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onStart()">Fragment#onStart()</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentStopped(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentStopped</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>)</code></div>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onStop()">Fragment#onStop()</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentViewCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.view.View,android.os.Bundle)">onFragmentViewCreated</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;v:&nbsp;View,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>)</code></div>
<p>Called after the fragment has returned a non-null view from the FragmentManager's request to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)">Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle)</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/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentViewDestroyed(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentViewDestroyed</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>)</code></div>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onDestroyView()">Fragment#onDestroyView()</a></code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Public constructors</h2>
<div><a name="FragmentLifecycleCallbacks--"></a>
<h3 class="api-name" id="FragmentLifecycleCallbacks()">FragmentLifecycleCallbacks</h3>
<pre class="api-signature no-pretty-print"><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#FragmentLifecycleCallbacks()">FragmentLifecycleCallbacks</a>()</pre>
</div>
<h2>Public functions</h2>
<div><a name="onFragmentActivityCreated(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.os.Bundle)"></a><a name="onFragmentActivityCreated-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-android.os.Bundle-"></a>
<h3 class="api-name" id="onFragmentActivityCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentActivityCreated</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<span><del><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentActivityCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentActivityCreated</a></del></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<aside class="caution"><strong>This function is deprecated.</strong><br>
<p>To get a callback specifically when a Fragment activity's onCreate is called, register a androidx.lifecycle.LifecycleObserver on the Activity's Lifecycle in <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentAttached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.content.Context)">onFragmentAttached</a></code>, removing it when it receives the Lifecycle.State#CREATED callback.</p>
</aside>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onActivityCreated(android.os.Bundle)">Fragment#onActivityCreated(Bundle)</a></code>. This will only happen once for any given fragment instance, though the fragment may be attached and detached multiple times.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
<tr>
<td><code>savedInstanceState:&nbsp;Bundle?</code></td>
<td width="100%">
<p>Saved instance bundle from a previous instance</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentAttached(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.content.Context)"></a><a name="onFragmentAttached-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-android.content.Context-"></a>
<h3 class="api-name" id="onFragmentAttached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.content.Context)">onFragmentAttached</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentAttached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.content.Context)">onFragmentAttached</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,&nbsp;context:&nbsp;Context):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has been attached to its host. Its host will have had <code>onAttachFragment</code> called before this call happens.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
<tr>
<td><code>context:&nbsp;Context</code></td>
<td width="100%">
<p>Context that the Fragment was attached to</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentCreated(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.os.Bundle)"></a><a name="onFragmentCreated-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-android.os.Bundle-"></a>
<h3 class="api-name" id="onFragmentCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentCreated</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentCreated</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreate(android.os.Bundle)">Fragment#onCreate(Bundle)</a></code>. This will only happen once for any given fragment instance, though the fragment may be attached and detached multiple times.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
<tr>
<td><code>savedInstanceState:&nbsp;Bundle?</code></td>
<td width="100%">
<p>Saved instance bundle from a previous instance</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentDestroyed(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"></a><a name="onFragmentDestroyed-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-"></a>
<h3 class="api-name" id="onFragmentDestroyed(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentDestroyed</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentDestroyed(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentDestroyed</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onDestroy()">Fragment#onDestroy()</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentDetached(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"></a><a name="onFragmentDetached-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-"></a>
<h3 class="api-name" id="onFragmentDetached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentDetached</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentDetached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentDetached</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onDetach()">Fragment#onDetach()</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentPaused(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"></a><a name="onFragmentPaused-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-"></a>
<h3 class="api-name" id="onFragmentPaused(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentPaused</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentPaused(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentPaused</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onPause()">Fragment#onPause()</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentPreAttached(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.content.Context)"></a><a name="onFragmentPreAttached-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-android.content.Context-"></a>
<h3 class="api-name" id="onFragmentPreAttached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.content.Context)">onFragmentPreAttached</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentPreAttached(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.content.Context)">onFragmentPreAttached</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,&nbsp;context:&nbsp;Context):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called right before the fragment's <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onAttach(android.content.Context)">Fragment#onAttach(Context)</a></code> method is called. This is a good time to inject any required dependencies or perform other configuration for the fragment before any of the fragment's lifecycle methods are invoked.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
<tr>
<td><code>context:&nbsp;Context</code></td>
<td width="100%">
<p>Context that the Fragment is being attached to</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentPreCreated(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.os.Bundle)"></a><a name="onFragmentPreCreated-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-android.os.Bundle-"></a>
<h3 class="api-name" id="onFragmentPreCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentPreCreated</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentPreCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentPreCreated</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called right before the fragment's <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreate(android.os.Bundle)">Fragment#onCreate(Bundle)</a></code> method is called. This is a good time to inject any required dependencies or perform other configuration for the fragment.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
<tr>
<td><code>savedInstanceState:&nbsp;Bundle?</code></td>
<td width="100%">
<p>Saved instance bundle from a previous instance</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentResumed(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"></a><a name="onFragmentResumed-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-"></a>
<h3 class="api-name" id="onFragmentResumed(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentResumed</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentResumed(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentResumed</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onResume()">Fragment#onResume()</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentSaveInstanceState(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.os.Bundle)"></a><a name="onFragmentSaveInstanceState-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-android.os.Bundle-"></a>
<h3 class="api-name" id="onFragmentSaveInstanceState(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentSaveInstanceState</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentSaveInstanceState(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.os.Bundle)">onFragmentSaveInstanceState</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;outState:&nbsp;Bundle<br>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onSaveInstanceState(android.os.Bundle)">Fragment#onSaveInstanceState(Bundle)</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
<tr>
<td><code>outState:&nbsp;Bundle</code></td>
<td width="100%">
<p>Saved state bundle for the fragment</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentStarted(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"></a><a name="onFragmentStarted-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-"></a>
<h3 class="api-name" id="onFragmentStarted(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentStarted</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentStarted(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentStarted</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onStart()">Fragment#onStart()</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentStopped(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"></a><a name="onFragmentStopped-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-"></a>
<h3 class="api-name" id="onFragmentStopped(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentStopped</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentStopped(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentStopped</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onStop()">Fragment#onStop()</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentViewCreated(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.view.View, android.os.Bundle)"></a><a name="onFragmentViewCreated-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-android.view.View-android.os.Bundle-"></a>
<h3 class="api-name" id="onFragmentViewCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.view.View,android.os.Bundle)">onFragmentViewCreated</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentViewCreated(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment,android.view.View,android.os.Bundle)">onFragmentViewCreated</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;v:&nbsp;View,<br>&nbsp;&nbsp;&nbsp;&nbsp;savedInstanceState:&nbsp;Bundle?<br>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned a non-null view from the FragmentManager's request to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)">Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle)</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment that created and owns the view</p>
</td>
</tr>
<tr>
<td><code>v:&nbsp;View</code></td>
<td width="100%">
<p>View returned by the fragment</p>
</td>
</tr>
<tr>
<td><code>savedInstanceState:&nbsp;Bundle?</code></td>
<td width="100%">
<p>Saved instance bundle from a previous instance</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFragmentViewDestroyed(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"></a><a name="onFragmentViewDestroyed-androidx.fragment.app.FragmentManager-androidx.fragment.app.Fragment-"></a>
<h3 class="api-name" id="onFragmentViewDestroyed(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentViewDestroyed</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.FragmentLifecycleCallbacks.html#onFragmentViewDestroyed(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">onFragmentViewDestroyed</a>(fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a>,&nbsp;f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Called after the fragment has returned from the FragmentManager's call to <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#onDestroyView()">Fragment#onDestroyView()</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>fm:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html">FragmentManager</a></code></td>
<td width="100%">
<p>Host FragmentManager</p>
</td>
</tr>
<tr>
<td><code>f:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code></td>
<td width="100%">
<p>Fragment changing state</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>