blob: eeb51d912e0d6b6bc7e5c2ddfda018b1a3197916 [file] [log] [blame]
<html devsite="true">
<head>
<title>FragmentHostCallback</title>
{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<h1>FragmentHostCallback</h1>
{% setvar page_path %}androidx/fragment/app/FragmentHostCallback.html{% endsetvar %}
{% setvar can_switch %}1{% endsetvar %}
{% include "reference/_kotlin_switcher2.md" %}
<p>
<pre>abstract class FragmentHostCallback&lt;E&gt; : <a href="/reference/kotlin/androidx/fragment/app/FragmentContainer.html">FragmentContainer</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/FragmentContainer.html">FragmentContainer</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/FragmentHostCallback.html">FragmentHostCallback</a></td>
</tr>
</tbody>
</table>
</div>
<hr>
<p>Integration points with the Fragment host. </p>
<p>Fragments may be hosted by any object; such as an Activity. In order to host fragments, implement <code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html">FragmentHostCallback</a></code>, overriding the methods applicable to the host. </p>
<p>FragmentManager changes its behavior based on what optional interfaces your FragmentHostCallback implements. This includes the following: </p>
<ul>
<li><b>ActivityResultRegistryOwner</b>: Removes the need to override <code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onStartIntentSenderFromFragment(androidx.fragment.app.Fragment,android.content.IntentSender,int,android.content.Intent,int,int,int,android.os.Bundle)">onStartIntentSenderFromFragment</a></code> or <code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onRequestPermissionsFromFragment(androidx.fragment.app.Fragment,java.lang.String[],int)">onRequestPermissionsFromFragment</a></code>.</li>
<li><b><code><a href="/reference/kotlin/androidx/fragment/app/FragmentOnAttachListener.html">FragmentOnAttachListener</a></code></b>: Removes the need to manually call <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#addFragmentOnAttachListener(androidx.fragment.app.FragmentOnAttachListener)">FragmentManager#addFragmentOnAttachListener</a></code> from your host in order to receive <code><a href="/reference/kotlin/androidx/fragment/app/FragmentOnAttachListener.html#onAttachFragment(androidx.fragment.app.FragmentManager,androidx.fragment.app.Fragment)">FragmentOnAttachListener#onAttachFragment</a></code> callbacks for the <code><a href="/reference/kotlin/androidx/fragment/app/FragmentController.html#getSupportFragmentManager()">FragmentController#getSupportFragmentManager()</a></code>.</li>
<li><b>androidx.activity.OnBackPressedDispatcherOwner</b>: Removes the need to manually call <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#popBackStackImmediate()">FragmentManager#popBackStackImmediate()</a></code> when handling the system back button.</li>
<li><b>androidx.lifecycle.ViewModelStoreOwner</b>: Removes the need for your <code><a href="/reference/kotlin/androidx/fragment/app/FragmentController.html">FragmentController</a></code> to call <code><a href="/reference/kotlin/androidx/fragment/app/FragmentController.html#retainNestedNonConfig()">FragmentController#retainNestedNonConfig()</a></code> or <code><a href="/reference/kotlin/androidx/fragment/app/FragmentController.html#restoreAllState(android.os.Parcelable,androidx.fragment.app.FragmentManagerNonConfig)">FragmentController#restoreAllState(Parcelable, FragmentManagerNonConfig)</a></code>.</li>
</ul>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&lt;E&gt;</code></td>
<td width="100%">
<p>the type of object that's currently hosting the fragments. An instance of this class must be returned by <code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onGetHost()">onGetHost</a></code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<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/FragmentHostCallback.html#FragmentHostCallback(android.content.Context,android.os.Handler,int)">FragmentHostCallback</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;context:&nbsp;Context,<br>&nbsp;&nbsp;&nbsp;&nbsp;handler:&nbsp;Handler,<br>&nbsp;&nbsp;&nbsp;&nbsp;windowAnimations:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><br>)</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><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onDump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[])">onDump</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 internal state into the given stream.</p>
</td>
</tr>
<tr>
<td><code>View?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onFindViewById(int)">onFindViewById</a>(id:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
<p>Return the view with the given resource ID.</p>
</td>
</tr>
<tr>
<td><code>abstract E?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onGetHost()">onGetHost</a>()</code></div>
<p>Return the object that's currently hosting the fragment.</p>
</td>
</tr>
<tr>
<td><code>LayoutInflater</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onGetLayoutInflater()">onGetLayoutInflater</a>()</code></div>
<p>Return a LayoutInflater.</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/FragmentHostCallback.html#onGetWindowAnimations()">onGetWindowAnimations</a>()</code></div>
<p>Return the window animations.</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/FragmentHostCallback.html#onHasView()">onHasView</a>()</code></div>
<p>Return <code>{@code true}</code> if the container holds any view.</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/FragmentHostCallback.html#onHasWindowAnimations()">onHasWindowAnimations</a>()</code></div>
<p>Return <code>{@code true}</code> if there are window animations.</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/FragmentHostCallback.html#onRequestPermissionsFromFragment(androidx.fragment.app.Fragment,java.lang.String[],int)">onRequestPermissionsFromFragment</a></del></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</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;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><br>)</code></div>
<p><strong>This function is deprecated.</strong>
<p>Have your FragmentHostCallback implement ActivityResultRegistryOwner to allow Fragments to 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;)">Fragment#registerForActivityResult(ActivityResultContract, ActivityResultCallback)</a></code> with RequestMultiplePermissions.</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/FragmentHostCallback.html#onShouldSaveFragmentState(androidx.fragment.app.Fragment)">onShouldSaveFragmentState</a>(fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>)</code></div>
<p>Return <code>{@code true}</code> if the fragment's state needs to be saved.</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/FragmentHostCallback.html#onShouldShowRequestPermissionRationale(java.lang.String)">onShouldShowRequestPermissionRationale</a>(permission:&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>)</code></div>
<p>Checks whether to show permission rationale UI from a 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/FragmentHostCallback.html#onStartActivityFromFragment(androidx.fragment.app.Fragment,android.content.Intent,int)">onStartActivityFromFragment</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;intent:&nbsp;Intent,<br>&nbsp;&nbsp;&nbsp;&nbsp;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><br>)</code></div>
<p>Starts a new Activity from the given 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/FragmentHostCallback.html#onStartActivityFromFragment(androidx.fragment.app.Fragment,android.content.Intent,int,android.os.Bundle)">onStartActivityFromFragment</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;intent:&nbsp;Intent,<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;options:&nbsp;Bundle?<br>)</code></div>
<p>Starts a new Activity from the given 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><span><del><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onStartIntentSenderFromFragment(androidx.fragment.app.Fragment,android.content.IntentSender,int,android.content.Intent,int,int,int,android.os.Bundle)">onStartIntentSenderFromFragment</a></del></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<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>Have your FragmentHostCallback implement ActivityResultRegistryOwner to allow Fragments to 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;)">Fragment#registerForActivityResult(ActivityResultContract, ActivityResultCallback)</a></code> with StartIntentSenderForResult.</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/FragmentHostCallback.html#onSupportInvalidateOptionsMenu()">onSupportInvalidateOptionsMenu</a>()</code></div>
<p>Invalidates the activity's options menu.</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/FragmentContainer.html">FragmentContainer</a></span>
<div class="devsite-table-wrapper">
<table class="responsive">
<tbody>
<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/FragmentContainer.html#instantiate(android.content.Context,java.lang.String,android.os.Bundle)">instantiate</a></del></span>(context:&nbsp;Context,&nbsp;className:&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>,&nbsp;arguments:&nbsp;Bundle?)</code></div>
<p><strong>This function is deprecated.</strong>
<p>Use <code><a href="/reference/kotlin/androidx/fragment/app/FragmentManager.html#setFragmentFactory(androidx.fragment.app.FragmentFactory)">FragmentManager#setFragmentFactory</a></code> to control how Fragments are instantiated.</p>
</p>
</td>
</tr>
</tbody>
</table>
</div>
</devsite-expandable> </td>
</tr>
</tbody>
</table>
</div>
<h2>Public constructors</h2>
<div><a name="FragmentHostCallback(android.content.Context, android.os.Handler, int)"></a><a name="FragmentHostCallback-android.content.Context-android.os.Handler-int-"></a>
<h3 class="api-name" id="FragmentHostCallback(android.content.Context,android.os.Handler,int)">FragmentHostCallback</h3>
<pre class="api-signature no-pretty-print"><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#FragmentHostCallback(android.content.Context,android.os.Handler,int)">FragmentHostCallback</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;context:&nbsp;Context,<br>&nbsp;&nbsp;&nbsp;&nbsp;handler:&nbsp;Handler,<br>&nbsp;&nbsp;&nbsp;&nbsp;windowAnimations:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><br>)</pre>
</div>
<h2>Public functions</h2>
<div><a name="onDump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[])"></a><a name="onDump-java.lang.String-java.io.FileDescriptor-java.io.PrintWriter-java.lang.String[]-"></a>
<h3 class="api-name" id="onDump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[])">onDump</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onDump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[])">onDump</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>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Print internal state into the given stream.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>prefix:&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html">String</a></code></td>
<td width="100%">
<p>Desired prefix to prepend at each line of output.</p>
</td>
</tr>
<tr>
<td><code>fd:&nbsp;<a href="https://developer.android.com/reference/java/io/FileDescriptor.html">FileDescriptor</a>?</code></td>
<td width="100%">
<p>The raw file descriptor that the dump is being sent to.</p>
</td>
</tr>
<tr>
<td><code>writer:&nbsp;<a href="https://developer.android.com/reference/java/io/PrintWriter.html">PrintWriter</a></code></td>
<td width="100%">
<p>The PrintWriter to which you should dump your state. This will be closed for you after you return.</p>
</td>
</tr>
<tr>
<td><code>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;?</code></td>
<td width="100%">
<p>additional arguments to the dump request.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><a name="onFindViewById-int-"></a>
<h3 class="api-name" id="onFindViewById(int)">onFindViewById</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onFindViewById(int)">onFindViewById</a>(id:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>):&nbsp;View?</pre>
<p>Return the view with the given resource ID. May return <code>{@code null}</code> if the view is not a child of this container.</p>
</div>
<div><a name="onGetHost--"></a>
<h3 class="api-name" id="onGetHost()">onGetHost</h3>
<pre class="api-signature no-pretty-print">abstract&nbsp;fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onGetHost()">onGetHost</a>():&nbsp;E?</pre>
<p>Return the object that's currently hosting the fragment. If a <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code> is hosted by a <code><a href="/reference/kotlin/androidx/fragment/app/FragmentActivity.html">FragmentActivity</a></code>, the object returned here should be the same object returned from <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#getActivity()">Fragment#getActivity()</a></code>.</p>
</div>
<div><a name="onGetLayoutInflater--"></a>
<h3 class="api-name" id="onGetLayoutInflater()">onGetLayoutInflater</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onGetLayoutInflater()">onGetLayoutInflater</a>():&nbsp;LayoutInflater</pre>
<p>Return a LayoutInflater. See Activity#getLayoutInflater().</p>
</div>
<div><a name="onGetWindowAnimations--"></a>
<h3 class="api-name" id="onGetWindowAnimations()">onGetWindowAnimations</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onGetWindowAnimations()">onGetWindowAnimations</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
<p>Return the window animations.</p>
</div>
<div><a name="onHasView--"></a>
<h3 class="api-name" id="onHasView()">onHasView</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onHasView()">onHasView</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></pre>
<p>Return <code>{@code true}</code> if the container holds any view.</p>
</div>
<div><a name="onHasWindowAnimations--"></a>
<h3 class="api-name" id="onHasWindowAnimations()">onHasWindowAnimations</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onHasWindowAnimations()">onHasWindowAnimations</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></pre>
<p>Return <code>{@code true}</code> if there are window animations.</p>
</div>
<div><a name="onRequestPermissionsFromFragment(androidx.fragment.app.Fragment, java.lang.String[], int)"></a><a name="onRequestPermissionsFromFragment-androidx.fragment.app.Fragment-java.lang.String[]-int-"></a>
<h3 class="api-name" id="onRequestPermissionsFromFragment(androidx.fragment.app.Fragment,java.lang.String[],int)">onRequestPermissionsFromFragment</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<span><del><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onRequestPermissionsFromFragment(androidx.fragment.app.Fragment,java.lang.String[],int)">onRequestPermissionsFromFragment</a></del></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</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;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><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>Have your FragmentHostCallback implement ActivityResultRegistryOwner to allow Fragments to 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;)">Fragment#registerForActivityResult(ActivityResultContract, ActivityResultCallback)</a></code> with RequestMultiplePermissions. This method will still be called when Fragments call the deprecated <code>requestPermissions()</code> method.</p>
</aside>
<p>Requests permissions from the given fragment. See FragmentActivity#requestPermissions(String[], int)</p>
</div>
<div><a name="onShouldSaveFragmentState-androidx.fragment.app.Fragment-"></a>
<h3 class="api-name" id="onShouldSaveFragmentState(androidx.fragment.app.Fragment)">onShouldSaveFragmentState</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onShouldSaveFragmentState(androidx.fragment.app.Fragment)">onShouldSaveFragmentState</a>(fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></pre>
<p>Return <code>{@code true}</code> if the fragment's state needs to be saved.</p>
</div>
<div><a name="onShouldShowRequestPermissionRationale-java.lang.String-"></a>
<h3 class="api-name" id="onShouldShowRequestPermissionRationale(java.lang.String)">onShouldShowRequestPermissionRationale</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onShouldShowRequestPermissionRationale(java.lang.String)">onShouldShowRequestPermissionRationale</a>(permission:&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html">String</a>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></pre>
<p>Checks whether to show permission rationale UI from a fragment. See FragmentActivity#shouldShowRequestPermissionRationale(String)</p>
</div>
<div><a name="onStartActivityFromFragment(androidx.fragment.app.Fragment, android.content.Intent, int)"></a><a name="onStartActivityFromFragment-androidx.fragment.app.Fragment-android.content.Intent-int-"></a>
<h3 class="api-name" id="onStartActivityFromFragment(androidx.fragment.app.Fragment,android.content.Intent,int)">onStartActivityFromFragment</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onStartActivityFromFragment(androidx.fragment.app.Fragment,android.content.Intent,int)">onStartActivityFromFragment</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;intent:&nbsp;Intent,<br>&nbsp;&nbsp;&nbsp;&nbsp;requestCode:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><br>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Starts a new Activity from the given fragment. See FragmentActivity#startActivityForResult(Intent, int).</p>
</div>
<div><a name="onStartActivityFromFragment(androidx.fragment.app.Fragment, android.content.Intent, int, android.os.Bundle)"></a><a name="onStartActivityFromFragment-androidx.fragment.app.Fragment-android.content.Intent-int-android.os.Bundle-"></a>
<h3 class="api-name" id="onStartActivityFromFragment(androidx.fragment.app.Fragment,android.content.Intent,int,android.os.Bundle)">onStartActivityFromFragment</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onStartActivityFromFragment(androidx.fragment.app.Fragment,android.content.Intent,int,android.os.Bundle)">onStartActivityFromFragment</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;intent:&nbsp;Intent,<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;options:&nbsp;Bundle?<br>):&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Starts a new Activity from the given fragment. See FragmentActivity#startActivityForResult(Intent, int, Bundle).</p>
</div>
<div><a name="onStartIntentSenderFromFragment(androidx.fragment.app.Fragment, android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle)"></a><a name="onStartIntentSenderFromFragment-androidx.fragment.app.Fragment-android.content.IntentSender-int-android.content.Intent-int-int-int-android.os.Bundle-"></a>
<h3 class="api-name" id="onStartIntentSenderFromFragment(androidx.fragment.app.Fragment,android.content.IntentSender,int,android.content.Intent,int,int,int,android.os.Bundle)">onStartIntentSenderFromFragment</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<span><del><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onStartIntentSenderFromFragment(androidx.fragment.app.Fragment,android.content.IntentSender,int,android.content.Intent,int,int,int,android.os.Bundle)">onStartIntentSenderFromFragment</a></del></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;fragment:&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a>,<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>):&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>Have your FragmentHostCallback implement ActivityResultRegistryOwner to allow Fragments to 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;)">Fragment#registerForActivityResult(ActivityResultContract, ActivityResultCallback)</a></code> with StartIntentSenderForResult. This method will still be called when Fragments call the deprecated <code>startIntentSenderForResult()</code> method.</p>
</aside>
<p>Starts a new IntentSender from the given fragment. See Activity#startIntentSender(IntentSender, Intent, int, int, int, Bundle).</p>
</div>
<div><a name="onSupportInvalidateOptionsMenu--"></a>
<h3 class="api-name" id="onSupportInvalidateOptionsMenu()">onSupportInvalidateOptionsMenu</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html#onSupportInvalidateOptionsMenu()">onSupportInvalidateOptionsMenu</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Invalidates the activity's options menu. See <code><a href="/reference/kotlin/androidx/fragment/app/FragmentActivity.html#supportInvalidateOptionsMenu()">FragmentActivity#supportInvalidateOptionsMenu()</a></code></p>
</div>
</body>
</html>