Support classes providing high level Leanback user interface building blocks: fragments and helpers.
Leanback fragments are available both as platform fragments (subclassed from
android.app.Fragment
) and as support fragments (subclassed from
android.support.v4.app.Fragment
). A few of the most
commonly used leanback fragments are described here.
A BrowseFragment
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 DetailsFragment
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 BrowseFragment, with the
convention that the first element in the ObjectAdapter corresponds to the overview row.
The DetailsOverviewRow
and
DetailsOverviewRowPresenter
provide a default template
for this row.
A PlaybackOverlayFragment
implements standard playback
transport controls with a Leanback
look and feel. It is recommended to use an instance of the
PlaybackControlGlue
with the
PlaybackOverlayFragment. This helper implements a standard behavior for user interaction with
the most commonly used controls such as fast forward and rewind.
A SearchFragment
allows the developer to accept a query
from a user and display the results
using the familiar list rows.
A GuidedStepFragment
is used to guide the user through a
decision or series of decisions.
PlaybackOverlayFragment.InputEventHandler | Interface allowing the application to handle input events. |
PlaybackOverlaySupportFragment.InputEventHandler | Interface allowing the application to handle input events. |
SearchFragment.SearchResultProvider | Search API to be provided by the application. |
SearchSupportFragment.SearchResultProvider | Search API to be provided by the application. |
BackgroundManager | Supports background image continuity between multiple Activities. |
BrowseFragment | A fragment for creating Leanback browse screens. |
BrowseFragment.BrowseTransitionListener | Listener for transitions between browse headers and rows. |
BrowseSupportFragment | A fragment for creating Leanback browse screens. |
BrowseSupportFragment.BrowseTransitionListener | Listener for transitions between browse headers and rows. |
DetailsFragment | A fragment for creating Leanback details screens. |
DetailsSupportFragment | A fragment for creating Leanback details screens. |
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. |
HeadersFragment | An internal fragment containing a list of row headers. |
HeadersSupportFragment | An internal fragment containing a list of row headers. |
MediaControllerGlue |
A helper class for implementing a glue layer between a
PlaybackOverlayFragment and a
MediaControllerCompat .
|
PlaybackControlGlue |
A helper class for managing a PlaybackControlsRow and
PlaybackOverlayFragment that implements a recommended approach to handling standard
playback control actions such as play/pause, fast forward/rewind at progressive speed levels,
and skip to next/previous.
|
PlaybackOverlayFragment | A fragment for displaying playback controls and related content. |
PlaybackOverlayFragment.OnFadeCompleteListener | Listener allowing the application to receive notification of fade in and/or fade out completion events. |
PlaybackOverlaySupportFragment | A fragment for displaying playback controls and related content. |
PlaybackOverlaySupportFragment.OnFadeCompleteListener | Listener allowing the application to receive notification of fade in and/or fade out completion events. |
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. |