FragmentHost
interfaceFragmentHost
androidx.leanback.app.BrowseFragment.FragmentHost |
Possible set of actions that BrowseFragment
exposes to clients. Custom fragments can interact with BrowseFragment
using this interface.
Summary
Public methods | |
---|---|
abstract Unit |
notifyDataReady(fragmentAdapter: BrowseFragment.MainFragmentAdapter<Fragment!>!) Fragments mapped to |
abstract Unit |
notifyViewCreated(fragmentAdapter: BrowseFragment.MainFragmentAdapter<Fragment!>!) Fragments are required to invoke this callback once their view is created inside |
abstract Unit |
showTitleView(show: Boolean) Show or hide title view in |
Public methods
notifyDataReady
abstract fun notifyDataReady(fragmentAdapter: BrowseFragment.MainFragmentAdapter<Fragment!>!): Unit
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 |
BrowseFragment.MainFragmentAdapter<Fragment!>!: MainFragmentAdapter used by the current fragment. |
notifyViewCreated
abstract fun notifyViewCreated(fragmentAdapter: BrowseFragment.MainFragmentAdapter<Fragment!>!): Unit
Fragments are required to invoke this callback once their view is created inside Fragment#onViewCreated
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 |
BrowseFragment.MainFragmentAdapter<Fragment!>!: MainFragmentAdapter used by the current fragment. |
showTitleView
abstract fun showTitleView(show: Boolean): Unit
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. |