Most visited

Recently visited

BrowseFragment.FragmentHost

public static interface BrowseFragment.FragmentHost

android.support.v17.leanback.app.BrowseFragment.FragmentHost


BrowseFragment可能对客户公开的一组操作。 自定义片段可以使用此界面与BrowseFragment进行交互。

Summary

Public methods

abstract void notifyDataReady(MainFragmentAdapter fragmentAdapter)

映射到 PageRow片段需要在为其转换创建数据后调用此回调,只有在收到此回调后才能进入动画。

abstract void notifyViewCreated(MainFragmentAdapter fragmentAdapter)

在 onViewCreated(View, Bundle)方法中创建视图后,片段需要调用此回调。

abstract void showTitleView(boolean show)

显示或隐藏在标题视图 BrowseFragment映射到片段 PageRow 。

Public methods

notifyDataReady

void notifyDataReady (MainFragmentAdapter fragmentAdapter)

映射到PageRow片段需要在为其转换创建数据后调用此回调,只有在收到此回调后才能进入动画。 未能调用此方法将导致片段不显示。

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

notifyViewCreated

void notifyViewCreated (MainFragmentAdapter fragmentAdapter)

在onViewCreated(View, Bundle)方法中创建视图后,片段需要调用此回调。 BrowseFragment只有在收到此回调后BrowseFragment启动入口动画。 未能调用此方法将导致片段不显示。

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

showTitleView

void showTitleView (boolean show)

在BrowseFragment显示或隐藏映射到PageRow片段的标题视图。 否则,请求将被忽略,在这种情况下BrowseFragment完全控制显示/隐藏标题视图。

当HeadersFragment可见时,如果当前焦点行上方还有其他可聚焦行,BrowseFragment将隐藏搜索示范视图。

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

Hooray!