ListRowPresenter
open class ListRowPresenter : RowPresenter
kotlin.Any | |||
↳ | androidx.leanback.widget.Presenter | ||
↳ | androidx.leanback.widget.RowPresenter | ||
↳ | androidx.leanback.widget.ListRowPresenter |
ListRowPresenter renders ListRow
using a HorizontalGridView
hosted in a ListRowView
.
Hover card
Optionally,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.
Row selection animation
ListRowPresenter disablesRowPresenter
's default full row dimming effect and draws a dim overlay on each child individually. A subclass may disable the overlay on each child by overriding isUsingDefaultListSelectEffect()
to return false and write its own child dim effect in applySelectLevelToChild(ViewHolder, View)
.
Shadow
ListRowPresenter applies a default shadow to each child view. CallsetShadowEnabled(boolean)
to disable shadows. A subclass may override and return false in isUsingDefaultShadow()
and replace with its own shadow implementation.
Summary
Nested classes | |
---|---|
open |
A task on the ListRowPresenter. |
open |
ViewHolder for the ListRowPresenter. |
Inherited constants | |
---|---|
Public constructors | |
---|---|
<init>() Constructs a ListRowPresenter with defaults. |
|
Constructs a ListRowPresenter with the given parameters. |
|
Constructs a ListRowPresenter with the given parameters. |
Public methods | |
---|---|
Boolean |
Returns true if rounded corners are enabled for children of this row. |
Unit |
enableChildRoundedCorners(enable: Boolean) Enables or disabled rounded corners on children of this row. |
open Unit |
freeze(holder: RowPresenter.ViewHolder!, freeze: Boolean) |
open Int |
Returns the expanded row height for rows created by this Presenter. |
Int |
Returns the zoom factor used for focus highlighting. |
PresenterSelector! |
Returns the |
open Int |
getRecycledPoolSize(presenter: Presenter!) Returns the recycled pool size for the given presenter. |
open Int |
Returns the row height for list rows created by this Presenter. |
Boolean |
Returns true if child shadow is enabled. |
Int |
Returns the zoom factor used for focus highlighting. |
Boolean |
Returns true if the focus dimmer is used for focus highlighting; false otherwise. |
Boolean |
Returns true if keeps foreground of child of this row, false otherwise. |
open Boolean |
Returns true so that default select effect is applied to each individual child of |
Boolean |
ListRowPresenter overrides the default select effect of |
open Boolean |
Default implementation returns true if SDK version >= 21, shadow (either static or z-order based) will be applied to each individual child of |
open Boolean |
isUsingOutlineClipping(context: Context!) Returns true if leanback view outline is enabled on the system or false otherwise. |
open Boolean |
isUsingZOrder(context: Context!) Returns true if SDK >= L, where Z shadow is enabled so that Z order is enabled on each child of horizontal list. |
open Unit |
setEntranceTransitionState(holder: RowPresenter.ViewHolder!, afterEntrance: Boolean) |
open Unit |
setExpandedRowHeight(rowHeight: Int) Sets the expanded row height for rows created by this Presenter. |
Unit |
setHoverCardPresenterSelector(selector: PresenterSelector!) Sets the |
Unit |
setKeepChildForeground(keep: Boolean) When ListRowPresenter applies overlay color on the child, it may change child's foreground Drawable. |
open Unit |
setNumRows(numRows: Int) Sets the numbers of rows for rendering the list of items. |
open Unit |
setRecycledPoolSize(presenter: Presenter!, size: Int) Sets the recycled pool size for the given presenter. |
open Unit |
setRowHeight(rowHeight: Int) Sets the row height for rows created by this Presenter. |
Unit |
setShadowEnabled(enabled: Boolean) Enables or disables child shadow. |
Protected methods | |
---|---|
open Unit |
applySelectLevelToChild(rowViewHolder: ListRowPresenter.ViewHolder!, childView: View!) Applies select level to a child. |
open RowPresenter.ViewHolder! |
createRowViewHolder(parent: ViewGroup!) |
open ShadowOverlayHelper.Options! |
Create ShadowOverlayHelper Options. |
open Unit |
dispatchItemSelectedListener(holder: RowPresenter.ViewHolder!, selected: Boolean) Dispatch item selected event using current selected item in the |
open Unit | |
open Unit |
onBindRowViewHolder(holder: RowPresenter.ViewHolder!, item: Any!) |
open Unit |
onRowViewExpanded(holder: RowPresenter.ViewHolder!, expanded: Boolean) |
open Unit |
onRowViewSelected(holder: RowPresenter.ViewHolder!, selected: Boolean) |
open Unit |
onSelectLevelChanged(holder: RowPresenter.ViewHolder!) Applies select level to header and draws a default color dim over each child of |
open Unit |
onUnbindRowViewHolder(holder: RowPresenter.ViewHolder!) |
Inherited functions | |
---|---|