java.lang.Object | |||
↳ | android.support.v17.leanback.widget.Presenter | ||
↳ | android.support.v17.leanback.widget.RowPresenter | ||
↳ | android.support.v17.leanback.widget.ListRowPresenter |
ListRowPresenter renders ListRow
using a
HorizontalGridView
hosted in a ListRowView
.
setHoverCardPresenterSelector(PresenterSelector)
can be used to
display a view for the currently focused list item below the rendered
list. This view is known as a hover card.
RowPresenter
's default dimming effect and draws
a dim overlay on each view individually. A subclass may override and disable
isUsingDefaultListSelectEffect()
and write its own dim effect in
onSelectLevelChanged(RowPresenter.ViewHolder)
.
setShadowEnabled(boolean)
to disable shadows. A subclass may override and return
false in isUsingDefaultShadow()
and replace with its own shadow implementation.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ListRowPresenter.ViewHolder | ViewHolder for the ListRowPresenter. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v17.leanback.widget.RowPresenter
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a ListRowPresenter with defaults.
| |||||||||||
Constructs a ListRowPresenter with the given parameters.
| |||||||||||
Constructs a ListRowPresenter with the given parameters.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns true if rounded corners are enabled for children of this row.
| |||||||||||
Returns true if the Row view can draw outside its bounds.
| |||||||||||
Enables or disabled rounded corners on children of this row.
| |||||||||||
Freezes/unfreezes the row, typically used when a transition starts/ends.
| |||||||||||
Returns the expanded row height for rows created by this Presenter.
| |||||||||||
Returns the zoom factor used for focus highlighting.
| |||||||||||
Returns the
PresenterSelector used for showing a select object in a hover card.
| |||||||||||
Returns the recycled pool size for the given presenter.
| |||||||||||
Returns the row height for list rows created by this Presenter.
| |||||||||||
Returns true if child shadow is enabled.
| |||||||||||
This method is deprecated.
use
getFocusZoomFactor() instead.
| |||||||||||
Returns true if the focus dimmer is used for focus highlighting; false otherwise.
| |||||||||||
Returns true so that default select effect is applied to each individual
child of
HorizontalGridView .
| |||||||||||
ListRowPresenter overrides the default select effect of
RowPresenter
and return false.
| |||||||||||
Returns true if SDK >= 18, where default shadow
is applied to each individual child of
HorizontalGridView .
| |||||||||||
Returns true if SDK >= L, where Z shadow is enabled so that Z order is enabled
on each child of horizontal list.
| |||||||||||
Changes the visibility of views.
| |||||||||||
Sets the expanded row height for rows created by this Presenter.
| |||||||||||
Sets the
PresenterSelector used for showing a select object in a hover card.
| |||||||||||
Sets the recycled pool size for the given presenter.
| |||||||||||
Sets the row height for rows created by this Presenter.
| |||||||||||
Enables or disables child shadow.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called to create a ViewHolder object for a Row.
| |||||||||||
Dispatch item selected event using current selected item in the
HorizontalGridView .
| |||||||||||
Called after a
RowPresenter.ViewHolder is created for a Row.
| |||||||||||
Binds the given row object to the given ViewHolder.
| |||||||||||
Called when the row view's expanded state changes.
| |||||||||||
Called when the given row view changes selection state.
| |||||||||||
Applies select level to header and draw a default color dim over each child
of
HorizontalGridView .
| |||||||||||
Unbinds the given ViewHolder.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v17.leanback.widget.RowPresenter
| |||||||||||
From class
android.support.v17.leanback.widget.Presenter
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
android.support.v17.leanback.widget.FacetProvider
|
Constructs a ListRowPresenter with defaults.
Uses ZOOM_FACTOR_MEDIUM
for focus zooming and
disabled dimming on focus.
Constructs a ListRowPresenter with the given parameters.
focusZoomFactor | Controls the zoom factor used when an item view is focused. One of
ZOOM_FACTOR_NONE ,
ZOOM_FACTOR_SMALL ,
ZOOM_FACTOR_XSMALL ,
ZOOM_FACTOR_MEDIUM ,
ZOOM_FACTOR_LARGE
Dimming on focus defaults to disabled.
|
---|
Constructs a ListRowPresenter with the given parameters.
focusZoomFactor | Controls the zoom factor used when an item view is focused. One of
ZOOM_FACTOR_NONE ,
ZOOM_FACTOR_SMALL ,
ZOOM_FACTOR_XSMALL ,
ZOOM_FACTOR_MEDIUM ,
ZOOM_FACTOR_LARGE |
---|---|
useFocusDimmer | determines if the FocusHighlighter will use the dimmer |
Returns true if rounded corners are enabled for children of this row.
Returns true if the Row view can draw outside its bounds.
Enables or disabled rounded corners on children of this row. Supported on Android SDK >= L.
Freezes/unfreezes the row, typically used when a transition starts/ends. This method is called by the fragment, it should not call it directly by the application.
Returns the expanded row height for rows created by this Presenter.
Returns the zoom factor used for focus highlighting.
Returns the PresenterSelector
used for showing a select object in a hover card.
Returns the recycled pool size for the given presenter.
Returns the row height for list rows created by this Presenter.
Returns true if child shadow is enabled. This is not only for enable/disable default shadow implementation but also subclass must respect this flag.
This method is deprecated.
use getFocusZoomFactor()
instead.
Returns the zoom factor used for focus highlighting.
Returns true if the focus dimmer is used for focus highlighting; false otherwise.
Returns true so that default select effect is applied to each individual
child of HorizontalGridView
. Subclass may return false to disable
the default implementation.
ListRowPresenter overrides the default select effect of RowPresenter
and return false.
Returns true if SDK >= 18, where default shadow
is applied to each individual child of HorizontalGridView
.
Subclass may return false to disable.
Returns true if SDK >= L, where Z shadow is enabled so that Z order is enabled on each child of horizontal list. If subclass returns false in isUsingDefaultShadow() and does not use Z-shadow on SDK >= L, it should override isUsingZOrder() return false.
Changes the visibility of views. The entrance transition will be run against the views that change visibilities. A subclass may override and begin with calling super.setEntranceTransitionState(). This method is called by the fragment, it should not call it directly by the application.
Sets the expanded row height for rows created by this Presenter. If not set, expanded rows have the same height as unexpanded rows.
rowHeight | The row height in to use when the row is expanded, in pixels, or WRAP_CONTENT, or 0 to use the default. |
---|
Sets the PresenterSelector
used for showing a select object in a hover card.
Sets the recycled pool size for the given presenter.
Sets the row height for rows created by this Presenter. Rows created before calling this method will not be updated.
rowHeight | Row height in pixels, or WRAP_CONTENT, or 0 to use the default height. |
---|
Enables or disables child shadow. This is not only for enable/disable default shadow implementation but also subclass must respect this flag.
Called to create a ViewHolder object for a Row. Subclasses will override this method to return a different concrete ViewHolder object.
parent | The parent View for the Row's view holder. |
---|
Dispatch item selected event using current selected item in the HorizontalGridView
.
The method should only be called from onRowViewSelected().
Called after a RowPresenter.ViewHolder
is created for a Row.
Subclasses may override this method and start by calling
super.initializeRowViewHolder(ViewHolder).
holder | The ViewHolder to initialize for the Row. |
---|
Binds the given row object to the given ViewHolder.
Called when the row view's expanded state changes. A subclass may override this method to respond to expanded state changes of a Row. The default implementation will hide/show the header view. Subclasses may make visual changes to the Row View but must not create animation on the Row view.
Called when the given row view changes selection state. A subclass may override this to respond to selected state changes of a Row. A subclass may make visual changes to Row view but must not create animation on the Row view.
Applies select level to header and draw a default color dim over each child
of HorizontalGridView
.
Subclass may override this method. A subclass
needs to call super.onSelectLevelChanged() for applying header select level
and optionally applying a default select level to each child view of
HorizontalGridView
if isUsingDefaultListSelectEffect()
is true. Subclass may override isUsingDefaultListSelectEffect()
to return
false and deal with the individual item select level by itself.