added in version 22.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
Summary:
Nested Classes
| Constants
| Ctors
| Methods
| Protected Methods
| Inherited Methods
| [Expand All]
RowPresenter
public
abstract
class
RowPresenter
extends Presenter
java.lang.Object | ||
↳ | android.support.v17.leanback.widget.Presenter | |
↳ | android.support.v17.leanback.widget.RowPresenter |
![]() |
![]() |
An abstract Presenter
that renders an Object in RowsFragment, the object can be
subclass Row
or a generic one. When the object is not Row
class,
getRow()
returns null.
Customize UI widgets
When a subclass of RowPresenter adds UI widgets, it should subclassRowPresenter.ViewHolder
and override createRowViewHolder(ViewGroup)
and initializeRowViewHolder(ViewHolder)
. The subclass must use layout id
"row_content" for the widget that will be aligned to the title of any HeadersFragment
that may exist in the parent fragment. RowPresenter contains an optional and
replaceable RowHeaderPresenter
that renders the header. You can disable
the default rendering or replace the Presenter with a new header presenter
by calling setHeaderPresenter(RowHeaderPresenter)
.
UI events from fragments
RowPresenter receives calls from its parent (typically a Fragment) when:-
A row is selected via
setRowViewSelected(Presenter.ViewHolder, boolean)
. The event is triggered immediately when there is a row selection change before the selection animation is started. Selected status may control activated status of the row (see "Activated status" below). Subclasses of RowPresenter may overrideonRowViewSelected(ViewHolder, boolean)
. -
A row is expanded to full height via