DetailsOverviewRowPresenter

open class DetailsOverviewRowPresenter : RowPresenter
kotlin.Any
   ↳ androidx.leanback.widget.Presenter
   ↳ androidx.leanback.widget.RowPresenter
   ↳ androidx.leanback.widget.DetailsOverviewRowPresenter

Renders a DetailsOverviewRow to display an overview of an item. Typically this row will be the first row in a fragment such as the DetailsFragment. The View created by the DetailsOverviewRowPresenter is made in three parts: ImageView on the left, action list view on the bottom and a customizable detailed description view on the right.

The detailed description is rendered using a Presenter passed in DetailsOverviewRowPresenter(Presenter). Typically this will be an instance of AbstractDetailsDescriptionPresenter. The application can access the detailed description ViewHolder from ViewHolder#mDetailsDescriptionViewHolder.

To participate in activity transition, call setSharedElementEnterTransition(Activity, * String) during Activity's onCreate().

Because transition support and layout are fully controlled by DetailsOverviewRowPresenter, developer can not override DetailsOverviewRowPresenter.ViewHolder for adding/replacing views of DetailsOverviewRowPresenter. If further customization is required beyond replacing the detailed description, the application should create a new row presenter class.

Summary

Nested classes

A ViewHolder for the DetailsOverviewRow.

Inherited constants
Public constructors
<init>(detailsPresenter: Presenter!)

Constructor for a DetailsOverviewRowPresenter.

Public methods
open OnActionClickedListener!

Returns the listener for Action click events.

Boolean

Unit
setSharedElementEnterTransition(activity: Activity!, sharedElementName: String!, timeoutMs: Long)

Sets the enter transition of target activity to be transiting into overview row created by this presenter.

Unit
setSharedElementEnterTransition(activity: Activity!, sharedElementName: String!)

Sets the enter transition of target activity to be transiting into overview row created by this presenter.

open Unit

Sets the listener for Action click events.

open Boolean

Returns true if the layout style is large.

open Unit

Sets the background color.

open Unit

Sets the layout style to be large or small.

open Int

Returns the background color.

Protected methods
open Unit

open RowPresenter.ViewHolder!

open Unit

open Unit

open Unit

open Unit

open Unit

Inherited functions

Public constructors

<init>

DetailsOverviewRowPresenter(detailsPresenter: Presenter!)

Constructor for a DetailsOverviewRowPresenter.

Parameters
detailsPresenter Presenter!: The Presenter used to render the detailed description of the row.

Public methods

getOnActionClickedListener

open fun getOnActionClickedListener(): OnActionClickedListener!

Returns the listener for Action click events.

isUsingDefaultSelectEffect

fun isUsingDefaultSelectEffect(): Boolean

setSharedElementEnterTransition

fun setSharedElementEnterTransition(activity: Activity!, sharedElementName: String!, timeoutMs: Long): Unit

Sets the enter transition of target activity to be transiting into overview row created by this presenter. The transition will be cancelled if the overview image is not loaded in the timeout period.

It assumes shared element passed from calling activity is an ImageView; the shared element transits to overview image on the starting edge of the detail overview row, while bounds of overview row grows and reveals text and action buttons.

The method must be invoked in target Activity's onCreate().

setSharedElementEnterTransition

fun setSharedElementEnterTransition(activity: Activity!, sharedElementName: String!): Unit

Sets the enter transition of target activity to be transiting into overview row created by this presenter. The transition will be cancelled if overview image is not loaded in a default timeout period.

It assumes shared element passed from calling activity is an ImageView; the shared element transits to overview image on the starting edge of the detail overview row, while bounds of overview row grows and reveals text and action buttons.

The method must be invoked in target Activity's onCreate().

setOnActionClickedListener

open fun setOnActionClickedListener(listener: OnActionClickedListener!): Unit

Sets the listener for Action click events.

isStyleLarge

open fun isStyleLarge(): Boolean

Returns true if the layout style is large.

setBackgroundColor

open fun setBackgroundColor(color: Int): Unit

Sets the background color. If not set, a default from the theme will be used.

setStyleLarge

open fun setStyleLarge(large: Boolean): Unit

Sets the layout style to be large or small. This affects the height of the overview, including the text description. The default is large.

getBackgroundColor

open fun getBackgroundColor(): Int

Returns the background color. If no background color was set, transparent is returned.

Protected methods

onRowViewDetachedFromWindow

protected open fun onRowViewDetachedFromWindow(vh: RowPresenter.ViewHolder!): Unit

createRowViewHolder

protected open fun createRowViewHolder(parent: ViewGroup!): RowPresenter.ViewHolder!

onSelectLevelChanged

protected open fun onSelectLevelChanged(holder: RowPresenter.ViewHolder!): Unit

onUnbindRowViewHolder

protected open fun onUnbindRowViewHolder(holder: RowPresenter.ViewHolder!): Unit

onRowViewAttachedToWindow

protected open fun onRowViewAttachedToWindow(vh: RowPresenter.ViewHolder!): Unit

onBindRowViewHolder

protected open fun onBindRowViewHolder(holder: RowPresenter.ViewHolder!, item: Any!): Unit

onRowViewSelected

protected open fun onRowViewSelected(vh: RowPresenter.ViewHolder!, selected: Boolean): Unit