Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!
added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0
Deprecated since version 1.0.0

BrowseFragment.FragmentHost

public static interface BrowseFragment.FragmentHost

androidx.leanback.app.BrowseFragment.FragmentHost


This interface was deprecated in API level 1.0.0.
use BrowseSupportFragment

Possible set of actions that BrowseFragment exposes to clients. Custom fragments can interact with BrowseFragment using this interface.

Summary

Public methods

abstract void notifyDataReady(MainFragmentAdapter fragmentAdapter)

Fragments mapped to PageRow are required to invoke this callback once their data is created for transition, the entrance animation only after receiving this callback.

abstract void notifyViewCreated(MainFragmentAdapter fragmentAdapter)

Fragments are required to invoke this callback once their view is created inside Fragment.onViewCreated(View, Bundle) method.

abstract void showTitleView(boolean show)

Show or hide title view in BrowseFragment for fragments mapped to PageRow.

Public methods

notifyDataReady

added in version 1.0.0
public abstract void notifyDataReady (MainFragmentAdapter fragmentAdapter)

Fragments mapped to PageRow are required to invoke this callback once their data is created for transition, the entrance animation only after receiving this callback. Failure to invoke this method will lead to fragment not showing up.

Parameters
fragmentAdapter MainFragmentAdapter: BrowseFragment.MainFragmentAdapter used by the current fragment.

notifyViewCreated

added in version 1.0.0
public abstract void notifyViewCreated (MainFragmentAdapter fragmentAdapter)

Fragments are required to invoke this callback once their view is created inside Fragment.onViewCreated(View, Bundle) method. BrowseFragment starts the entrance animation only after receiving this callback. Failure to invoke this method will lead to fragment not showing up.

Parameters
fragmentAdapter MainFragmentAdapter: BrowseFragment.MainFragmentAdapter used by the current fragment.

showTitleView

added in version 1.0.0
public abstract void showTitleView (boolean show)

Show or hide title view in BrowseFragment for fragments mapped to PageRow. Otherwise the request is ignored, in that case BrowseFragment is fully in control of showing/hiding title view.

When HeadersFragment is visible, BrowseFragment will hide search affordance view if there are other focusable rows above currently focused row.

Parameters
show boolean: Boolean indicating whether or not to show the title view.