FullWidthDetailsOverviewRowPresenter
open class FullWidthDetailsOverviewRowPresenter : RowPresenter
kotlin.Any | |||
↳ | androidx.leanback.widget.Presenter | ||
↳ | androidx.leanback.widget.RowPresenter | ||
↳ | androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter |
Renders a DetailsOverviewRow
to display an overview of an item. Typically this row will be the first row in a fragment such as the androidx.leanback.app.DetailsFragment
. The View created by the FullWidthDetailsOverviewRowPresenter is made in three parts: logo view on the left, action list view on the top and a customizable detailed description view on the right.
The detailed description is rendered using a Presenter
passed in FullWidthDetailsOverviewRowPresenter(Presenter)
. Typically this will be an instance of AbstractDetailsDescriptionPresenter
. The application can access the detailed description ViewHolder from ViewHolder#getDetailsDescriptionViewHolder()
.
The logo view is rendered using a customizable DetailsOverviewLogoPresenter
passed in FullWidthDetailsOverviewRowPresenter(Presenter, DetailsOverviewLogoPresenter)
. The application can access the logo ViewHolder from ViewHolder#getLogoViewHolder()
.
To support activity shared element transition, call setListener(Listener)
with FullWidthDetailsOverviewSharedElementHelper
during Activity's onCreate(). Application is free to create its own "shared element helper" class using the Listener for image binding. Call setParticipatingEntranceTransition(boolean)
with false
The view has three states: STATE_HALF
STATE_FULL
and STATE_SMALL
. See androidx.leanback.app.DetailsFragment
where it switches states based on selected row position.
Summary
Nested classes | |
---|---|
abstract |
Listeners for events on ViewHolder. |
open |
A ViewHolder for the DetailsOverviewRow. |
Constants | |
---|---|
static Int |
This is the alignment mode that the ending edge of logo and the starting edge of description align to the middle of the overview view. |
static Int |
This is the alignment mode that the logo and description align to the starting edge of the overview view. |
static Int |
This is the state when the view covers full width and height of screen. |
static Int |
This is the default state corresponding to layout file. |
static Int |
This is the state where the view shrinks to a small banner. |
Inherited constants | |
---|---|
Public constructors | |
---|---|
Constructor for a FullWidthDetailsOverviewRowPresenter. |
|
<init>(detailsPresenter: Presenter!, logoPresenter: DetailsOverviewLogoPresenter!) Constructor for a FullWidthDetailsOverviewRowPresenter. |
Public methods | |
---|---|
Int |
Returns the background color of actions. |
Int |
Returns alignment mode of Description. |
Int |
Returns the background color. |
Int |
Returns the initial state used to create ViewHolder. |
open OnActionClickedListener! |
Returns the listener for Action click events. |
Boolean |
Returns true if the overview should be part of shared element transition. |
Boolean | |
Unit |
Called by |
Unit |
setActionsBackgroundColor(color: Int) Sets the background color for Action Bar. |
Unit |
setAlignmentMode(alignmentMode: Int) Set alignment mode of Description. |
Unit |
setBackgroundColor(color: Int) Sets the background color. |
open Unit |
setEntranceTransitionState(holder: RowPresenter.ViewHolder!, afterEntrance: Boolean) |
Unit |
setInitialState(state: Int) Change the initial state used to create ViewHolder. |
Unit |
Set listener for details overview presenter. |
open Unit |
setOnActionClickedListener(listener: OnActionClickedListener!) Sets the listener for Action click events. |
Unit |
setParticipatingEntranceTransition(participating: Boolean) Sets if the overview should be part of shared element transition. |
Unit |
setState(viewHolder: FullWidthDetailsOverviewRowPresenter.ViewHolder!, state: Int) Switch state of a ViewHolder. |
Protected methods | |
---|---|
open RowPresenter.ViewHolder! |
createRowViewHolder(parent: ViewGroup!) |
open Int |
Get resource id to inflate the layout. |
open Boolean | |
open Unit |
onBindRowViewHolder(holder: RowPresenter.ViewHolder!, item: Any!) |
open Unit |
onLayoutLogo(viewHolder: FullWidthDetailsOverviewRowPresenter.ViewHolder!, oldState: Int, logoChanged: Boolean) Layout logo position based on current state. |
open Unit |
onLayoutOverviewFrame(viewHolder: FullWidthDetailsOverviewRowPresenter.ViewHolder!, oldState: Int, logoChanged: Boolean) Layout overview frame based on current state. |
open Unit | |
open Unit | |
open Unit |
onSelectLevelChanged(holder: RowPresenter.ViewHolder!) |
open Unit |