Skip to content

Most visited

Recently visited

navigation
added in version 22.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1

AbstractDetailsDescriptionPresenter

public abstract class AbstractDetailsDescriptionPresenter
extends Presenter

java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter
     ↳ android.support.v17.leanback.widget.AbstractDetailsDescriptionPresenter


An abstract Presenter for rendering a detailed description of an item. Typically this Presenter will be used in a DetailsOverviewRowPresenter or PlaybackControlsRowPresenter.

Subclasses must override onBindDescription(AbstractDetailsDescriptionPresenter.ViewHolder, Object) to implement the data binding for this Presenter.

Summary

Nested classes

class AbstractDetailsDescriptionPresenter.ViewHolder

The ViewHolder for the AbstractDetailsDescriptionPresenter

Public constructors

AbstractDetailsDescriptionPresenter()

Public methods

final void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item)

Binds a View to an item.

final AbstractDetailsDescriptionPresenter.ViewHolder onCreateViewHolder(ViewGroup parent)

Creates a new View.

void onUnbindViewHolder(Presenter.ViewHolder viewHolder)

Unbinds a View from an item.

void onViewAttachedToWindow(Presenter.ViewHolder holder)

Called when a view created by this presenter has been attached to a window.

void onViewDetachedFromWindow(Presenter.ViewHolder holder)

Called when a view created by this presenter has been detached from its window.

Protected methods

abstract void onBindDescription(AbstractDetailsDescriptionPresenter.ViewHolder vh, Object item)

Binds the data from the item to the ViewHolder.

Inherited methods

From class android.support.v17.leanback.widget.Presenter
From class java.lang.Object
From interface android.support.v17.leanback.widget.FacetProvider

Public constructors

AbstractDetailsDescriptionPresenter

added in version 22.1.0
AbstractDetailsDescriptionPresenter ()

Public methods

onBindViewHolder

added in version 22.1.0
void onBindViewHolder (Presenter.ViewHolder viewHolder, 
                Object item)

Binds a View to an item.

Parameters
viewHolder Presenter.ViewHolder

item Object

onCreateViewHolder

added in version 22.1.0
AbstractDetailsDescriptionPresenter.ViewHolder onCreateViewHolder (ViewGroup parent)

Creates a new View.

Parameters
parent ViewGroup

Returns
AbstractDetailsDescriptionPresenter.ViewHolder

onUnbindViewHolder

added in version 22.1.0
void onUnbindViewHolder (Presenter.ViewHolder viewHolder)

Unbinds a View from an item. Any expensive references may be released here, and any fields that are not bound for every item should be cleared here.

Parameters
viewHolder Presenter.ViewHolder

onViewAttachedToWindow

added in version 22.1.0
void onViewAttachedToWindow (Presenter.ViewHolder holder)

Called when a view created by this presenter has been attached to a window.

This can be used as a reasonable signal that the view is about to be seen by the user. If the adapter previously freed any resources in onViewDetachedFromWindow(ViewHolder) those resources should be restored here.

Parameters
holder Presenter.ViewHolder: Holder of the view being attached

onViewDetachedFromWindow

added in version 22.1.0
void onViewDetachedFromWindow (Presenter.ViewHolder holder)

Called when a view created by this presenter has been detached from its window.

Becoming detached from the window is not necessarily a permanent condition; the consumer of an presenter's views may choose to cache views offscreen while they are not visible, attaching and detaching them as appropriate.

Any view property animations should be cancelled here or the view may fail to be recycled.

Parameters
holder Presenter.ViewHolder: Holder of the view being detached

Protected methods

onBindDescription

added in version 22.1.0
void onBindDescription (AbstractDetailsDescriptionPresenter.ViewHolder vh, 
                Object item)

Binds the data from the item to the ViewHolder. The item is typically associated with a DetailsOverviewRow or PlaybackControlsRow.

Parameters
vh AbstractDetailsDescriptionPresenter.ViewHolder: The ViewHolder for this details description view.

item Object: The item being presented.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)