package

androidx.leanback.app

Overview

Support classes providing high level Leanback user interface building blocks.

Leanback fragments are available both as support fragments (subclassed from androidx.fragment.app.Fragment) and as platform fragments (subclassed from ). A few of the most commonly used leanback fragments are described here.

A BrowseSupportFragment by default operates in the "row" mode. It includes an optional “fastlane” navigation side panel and a list of rows, with one-to-one correspondance between each header in the fastlane and a row. The application supplies the ObjectAdapter containing the list of rows and a PresenterSelector of row presenters.

A BrowseSupportFragment also works in a "page" mode when each row of fastlane is mapped to a fragment that the app registers in BrowseSupportFragment.getMainFragmentRegistry().

A DetailsSupportFragment will typically consist of a large overview of an item at the top, some actions that a user can perform, and possibly rows of additional or related items. The content for this fragment is specified in the same way as for the BrowseSupportFragment, with the convention that the first element in the ObjectAdapter corresponds to the overview row. The DetailsOverviewRow and FullWidthDetailsOverviewRowPresenter provide a default template for this row.

A PlaybackSupportFragment or its subclass VideoSupportFragment hosts PlaybackTransportControlGlue or PlaybackBannerControlGlue with a Leanback look and feel. It is recommended to use an instance of PlaybackTransportControlGlue. This helper implements a standard behavior for user interaction with the most commonly used controls as well as video scrubbing.

A SearchSupportFragment allows the developer to accept a query from a user and display the results using the familiar list rows.

A GuidedStepSupportFragment is used to guide the user through a decision or series of decisions.

Interfaces

BrowseFragment.FragmentHostPossible set of actions that BrowseFragment exposes to clients.
BrowseFragment.MainFragmentAdapterProviderInterface to be implemented by all fragments for providing an instance of BrowseFragment.MainFragmentAdapter.
BrowseFragment.MainFragmentRowsAdapterProviderInterface to be implemented by RowsFragment and its subclasses for providing an instance of BrowseFragment.MainFragmentRowsAdapter.
BrowseSupportFragment.FragmentHostPossible set of actions that BrowseSupportFragment exposes to clients.
BrowseSupportFragment.MainFragmentAdapterProviderInterface to be implemented by all fragments for providing an instance of BrowseSupportFragment.MainFragmentAdapter.
BrowseSupportFragment.MainFragmentRowsAdapterProviderInterface to be implemented by RowsSupportFragment and its subclasses for providing an instance of BrowseSupportFragment.MainFragmentRowsAdapter.
HeadersFragment.OnHeaderClickedListenerInterface definition for a callback to be invoked when a header item is clicked.
HeadersFragment.OnHeaderViewSelectedListenerInterface definition for a callback to be invoked when a header item is selected.
HeadersSupportFragment.OnHeaderClickedListenerInterface definition for a callback to be invoked when a header item is clicked.
HeadersSupportFragment.OnHeaderViewSelectedListenerInterface definition for a callback to be invoked when a header item is selected.
SearchFragment.SearchResultProviderSearch API to be provided by the application.
SearchSupportFragment.SearchResultProviderSearch API to be provided by the application.

Classes

BackgroundFragmentFragment used by the background manager.
BackgroundManagerSupports background image continuity between multiple Activities.
BaseFragmentBase class for leanback Fragments.
BaseSupportFragmentBase class for leanback Fragments.
BrandedFragmentFragment class for managing search and branding using a view that implements .
BrandedSupportFragmentFragment class for managing search and branding using a view that implements .
BrowseFragmentA fragment for creating Leanback browse screens.
BrowseFragment.BrowseTransitionListenerListener for transitions between browse headers and rows.
BrowseFragment.FragmentFactory<T>Factory class responsible for creating fragment given the current item.
BrowseFragment.ListRowFragmentFactoryFragmentFactory implementation for ListRow.
BrowseFragment.MainFragmentAdapter<T>Interface that defines the interaction between BrowseFragment and its main content fragment.
BrowseFragment.MainFragmentAdapterRegistryRegistry class maintaining the mapping of Row subclasses to BrowseFragment.FragmentFactory.
BrowseFragment.MainFragmentRowsAdapter<T>This is used to pass information to RowsFragment or its subclasses.
BrowseSupportFragmentA fragment for creating Leanback browse screens.
BrowseSupportFragment.BrowseTransitionListenerListener for transitions between browse headers and rows.
BrowseSupportFragment.FragmentFactory<T>Factory class responsible for creating fragment given the current item.
BrowseSupportFragment.ListRowFragmentFactoryFragmentFactory implementation for ListRow.
BrowseSupportFragment.MainFragmentAdapter<T>Interface that defines the interaction between BrowseSupportFragment and its main content fragment.
BrowseSupportFragment.MainFragmentAdapterRegistryRegistry class maintaining the mapping of Row subclasses to BrowseSupportFragment.FragmentFactory.
BrowseSupportFragment.MainFragmentRowsAdapter<T>This is used to pass information to RowsSupportFragment or its subclasses.
DetailsFragmentA fragment for creating Leanback details screens.
DetailsFragmentBackgroundControllerController for DetailsFragment parallax background and embedded video play.
DetailsSupportFragmentA fragment for creating Leanback details screens.
DetailsSupportFragmentBackgroundControllerController for DetailsSupportFragment parallax background and embedded video play.
ErrorFragmentA fragment for displaying an error indication.
ErrorSupportFragmentA fragment for displaying an error indication.
GuidedStepFragmentA GuidedStepFragment is used to guide the user through a decision or series of decisions.
GuidedStepFragment.DummyFragment
GuidedStepSupportFragmentA GuidedStepSupportFragment is used to guide the user through a decision or series of decisions.
GuidedStepSupportFragment.DummyFragment
HeadersFragmentAn fragment containing a list of row headers.
HeadersSupportFragmentAn fragment containing a list of row headers.
OnboardingFragmentAn OnboardingFragment provides a common and simple way to build onboarding screen for applications.
OnboardingSupportFragmentAn OnboardingSupportFragment provides a common and simple way to build onboarding screen for applications.
PermissionHelper
PlaybackFragmentA fragment for displaying playback controls and related content.
PlaybackFragment.OnFadeCompleteListenerListener allowing the application to receive notification of fade in and/or fade out completion events.
PlaybackFragmentGlueHostPlaybackGlueHost implementation the interaction between this class and PlaybackFragment.
PlaybackSupportFragmentA fragment for displaying playback controls and related content.
PlaybackSupportFragment.OnFadeCompleteListenerListener allowing the application to receive notification of fade in and/or fade out completion events.
PlaybackSupportFragmentGlueHostPlaybackGlueHost implementation the interaction between this class and PlaybackSupportFragment.
ProgressBarManagerManager for showing/hiding progress bar widget.
RowsFragmentAn ordered set of rows of leanback widgets.
RowsFragment.MainFragmentAdapter
RowsFragment.MainFragmentRowsAdapterThe adapter that RowsFragment implements BrowseFragment.MainFragmentRowsAdapter.
RowsSupportFragmentAn ordered set of rows of leanback widgets.
RowsSupportFragment.MainFragmentAdapter
RowsSupportFragment.MainFragmentRowsAdapterThe adapter that RowsSupportFragment implements BrowseSupportFragment.MainFragmentRowsAdapter.
SearchFragmentA fragment to handle searches.
SearchSupportFragmentA fragment to handle searches.
VerticalGridFragmentA fragment for creating leanback vertical grids.
VerticalGridSupportFragmentA fragment for creating leanback vertical grids.
VideoFragmentSubclass of PlaybackFragment that is responsible for providing a and rendering video.
VideoFragmentGlueHostPlaybackGlueHost implementation the interaction between PlaybackGlue and VideoFragment.
VideoSupportFragmentSubclass of PlaybackSupportFragment that is responsible for providing a and rendering video.
VideoSupportFragmentGlueHostPlaybackGlueHost implementation the interaction between PlaybackGlue and VideoSupportFragment.