FragmentContainer


public abstract class FragmentContainer

Known direct subclasses
FragmentHostCallback

Integration points with the Fragment host.


Callbacks to a Fragment's container.

Summary

Public constructors

Public methods

@NonNull Fragment
instantiate(
    @NonNull Context context,
    @NonNull String className,
    @Nullable Bundle arguments
)

This method is deprecated.

Use setFragmentFactory to control how Fragments are instantiated.

abstract @Nullable View

Return the view with the given resource ID.

abstract boolean

Return true if the container holds any view.

Public constructors

FragmentContainer

Added in 1.1.0
public FragmentContainer()

Public methods

instantiate

Added in 1.1.0
Deprecated in 1.1.0
public @NonNull Fragment instantiate(
    @NonNull Context context,
    @NonNull String className,
    @Nullable 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.

onFindViewById

Added in 1.1.0
public abstract @Nullable View onFindViewById(@IdRes int id)

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

onHasView

Added in 1.1.0
public abstract boolean onHasView()

Return true if the container holds any view.