public class

Presenter.ViewHolder

extends java.lang.Object

implements FacetProvider

 java.lang.Object

↳androidx.leanback.widget.Presenter.ViewHolder

Subclasses:

PlaybackTransportRowPresenter.ViewHolder, FullWidthDetailsOverviewRowPresenter.ViewHolder, AbstractDetailsDescriptionPresenter.ViewHolder, AbstractMediaListHeaderPresenter.ViewHolder, PlaybackControlsRowPresenter.ViewHolder, PlaybackRowPresenter.ViewHolder, ListRowPresenter.ViewHolder, RowPresenter.ViewHolder, DetailsOverviewLogoPresenter.ViewHolder, AbstractMediaItemPresenter.ViewHolder, DetailsOverviewRowPresenter.ViewHolder, VerticalGridPresenter.ViewHolder, RowHeaderPresenter.ViewHolder

Overview

ViewHolder can be subclassed and used to cache any view accessors needed to improve binding performance (for example, results of findViewById) without needing to subclass a View.

Summary

Fields
public final Viewview

Constructors
publicViewHolder(View view)

Methods
public final java.lang.ObjectgetFacet(java.lang.Class<java.lang.Object> facetClass)

public final voidsetFacet(java.lang.Class<java.lang.Object> facetClass, java.lang.Object facetImpl)

Sets dynamic implemented facet in addition to basic ViewHolder functions.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public final View view

Constructors

public ViewHolder(View view)

Methods

public final java.lang.Object getFacet(java.lang.Class<java.lang.Object> facetClass)

public final void setFacet(java.lang.Class<java.lang.Object> facetClass, java.lang.Object facetImpl)

Sets dynamic implemented facet in addition to basic ViewHolder functions.

Parameters:

facetClass: Facet classes to query, can be class of ItemAlignmentFacet.
facetImpl: Facet implementation.