blob: 4b655b16bcfea372bea527c1fbbac45862be55f8 [file] [log] [blame]
<html devsite="true">
<head>
<title>FragmentContainer</title>
{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<h1>FragmentContainer</h1>
{% setvar page_path %}androidx/fragment/app/FragmentContainer.html{% endsetvar %}
{% setvar can_switch %}1{% endsetvar %}
{% include "reference/_kotlin_switcher2.md" %}
<p>
<pre>abstract class FragmentContainer</pre>
</p>
<div class="devsite-table-wrapper"><devsite-expandable><span class="expand-control jd-sumtable-subclasses">Known direct subclasses
<div class="showalways" id="subclasses-direct"><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html">FragmentHostCallback</a></div>
</span>
<div id="subclasses-direct-summary">
<div class="devsite-table-wrapper">
<table class="responsive">
<tbody>
<tr>
<td><code><a href="/reference/kotlin/androidx/fragment/app/FragmentHostCallback.html">FragmentHostCallback</a></code></td>
<td width="100%">
<p>Integration points with the Fragment host.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</devsite-expandable> </div>
<hr>
<p>Callbacks to a <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></code>'s container.</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/FragmentContainer.html#FragmentContainer()">FragmentContainer</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="/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>
<tr>
<td><code>abstract View?</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/fragment/app/FragmentContainer.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 <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/FragmentContainer.html#onHasView()">onHasView</a>()</code></div>
<p>Return <code>{@code true}</code> if the container holds any view.</p>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Public constructors</h2>
<div><a name="FragmentContainer--"></a>
<h3 class="api-name" id="FragmentContainer()">FragmentContainer</h3>
<pre class="api-signature no-pretty-print"><a href="/reference/kotlin/androidx/fragment/app/FragmentContainer.html#FragmentContainer()">FragmentContainer</a>()</pre>
</div>
<h2>Public functions</h2>
<div><a name="instantiate(android.content.Context, java.lang.String, android.os.Bundle)"></a><a name="instantiate-android.content.Context-java.lang.String-android.os.Bundle-"></a>
<h3 class="api-name" id="instantiate(android.content.Context,java.lang.String,android.os.Bundle)">instantiate</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<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?):&nbsp;<a href="/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a></pre>
<aside class="caution"><strong>This function is deprecated.</strong><br>
<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>
</aside>
<p>Creates an instance of the specified fragment, can be overridden to construct fragments with dependencies, or change the fragment being constructed. By default just calls <code><a href="/reference/kotlin/androidx/fragment/app/Fragment.html#instantiate(android.content.Context,java.lang.String,android.os.Bundle)">Fragment#instantiate(Context, String, Bundle)</a></code>.</p>
</div>
<div><a name="onFindViewById-int-"></a>
<h3 class="api-name" id="onFindViewById(int)">onFindViewById</h3>
<pre class="api-signature no-pretty-print">abstract&nbsp;fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentContainer.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="onHasView--"></a>
<h3 class="api-name" id="onHasView()">onHasView</h3>
<pre class="api-signature no-pretty-print">abstract&nbsp;fun&nbsp;<a href="/reference/kotlin/androidx/fragment/app/FragmentContainer.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>
</body>
</html>