androidx.leanback.app

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 android.app.Fragment). A few of the most commonly used leanback fragments are described here.

A androidx.leanback.app.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 androidx.leanback.widget.ObjectAdapter containing the list of rows and a androidx.leanback.widget.PresenterSelector of row presenters.

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

A androidx.leanback.app.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 androidx.leanback.widget.DetailsOverviewRow and androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter provide a default template for this row.

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

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

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

Classes

BackgroundManager

Supports background image continuity between multiple Activities.

BaseFragment

Base class for leanback Fragments.

BaseSupportFragment

Base class for leanback Fragments.

BrandedFragment

Fragment class for managing search and branding using a view that implements TitleViewAdapter.Provider.

BrandedSupportFragment

Fragment class for managing search and branding using a view that implements TitleViewAdapter.Provider.

BrowseFragment

A fragment for creating Leanback browse screens.

BrowseSupportFragment

A fragment for creating Leanback browse screens.

DetailsFragment

A fragment for creating Leanback details screens.

DetailsFragmentBackgroundController

Controller for DetailsFragment parallax background and embedded video play.

DetailsSupportFragment

A fragment for creating Leanback details screens.

DetailsSupportFragmentBackgroundController

Controller for DetailsSupportFragment parallax background and embedded video play.

ErrorFragment

A fragment for displaying an error indication.

ErrorSupportFragment

A fragment for displaying an error indication.

GuidedStepFragment

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

GuidedStepSupportFragment

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

HeadersFragment

An fragment containing a list of row headers.

HeadersSupportFragment

An fragment containing a list of row headers.

OnboardingFragment

An OnboardingFragment provides a common and simple way to build onboarding screen for applications.

OnboardingSupportFragment

An OnboardingSupportFragment provides a common and simple way to build onboarding screen for applications.

PlaybackFragment

A fragment for displaying playback controls and related content.

PlaybackFragmentGlueHost

PlaybackGlueHost implementation the interaction between this class and PlaybackFragment.

PlaybackSupportFragment

A fragment for displaying playback controls and related content.

PlaybackSupportFragmentGlueHost

PlaybackGlueHost implementation the interaction between this class and PlaybackSupportFragment.

ProgressBarManager

Manager for showing/hiding progress bar widget.

RowsFragment

An ordered set of rows of leanback widgets.

RowsSupportFragment

An ordered set of rows of leanback widgets.

SearchFragment

A fragment to handle searches.

SearchSupportFragment

A fragment to handle searches.

VerticalGridFragment

A fragment for creating leanback vertical grids.

VerticalGridSupportFragment

A fragment for creating leanback vertical grids.

VideoFragment

Subclass of PlaybackFragment that is responsible for providing a SurfaceView and rendering video.

VideoFragmentGlueHost

PlaybackGlueHost implementation the interaction between PlaybackGlue and VideoFragment.

VideoSupportFragment

Subclass of PlaybackSupportFragment that is responsible for providing a SurfaceView and rendering video.

VideoSupportFragmentGlueHost

PlaybackGlueHost implementation the interaction between PlaybackGlue and VideoSupportFragment.