Skip to content

Most visited

Recently visited

navigation

FragmentContainer

public abstract class FragmentContainer
extends Object

java.lang.Object
   ↳ android.app.FragmentContainer
Known Direct Subclasses


Callbacks to a Fragment's container.

Summary

Public constructors

FragmentContainer()

Public methods

Fragment instantiate(Context context, String className, Bundle arguments)

Creates an instance of the specified fragment, can be overridden to construct fragments with dependencies, or change the fragment being constructed.

abstract <T extends View> T onFindViewById(int id)

Return the view with the given resource ID.

abstract boolean onHasView()

Return true if the container holds any view.

Inherited methods

From class java.lang.Object

Public constructors

FragmentContainer

added in API level 23
FragmentContainer ()

Public methods

instantiate

Fragment instantiate (Context context, 
                String className, 
                Bundle arguments)

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 instantiate(Context, String, Bundle).

Parameters
context Context
className String
arguments Bundle
Returns
Fragment

onFindViewById

added in API level 23
T onFindViewById (int id)

Return the view with the given resource ID. May return null if the view is not a child of this container.

Parameters
id int
Returns
T

onHasView

added in API level 23
boolean onHasView ()

Return true if the container holds any view.

Returns
boolean
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.