Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
Android 0.0.0 Developer Preview
belongs to Maven artifact androidx.leanback:leanback:1.1.0-alpha01

ItemBridgeAdapter.ViewHolder

public class ItemBridgeAdapter.ViewHolder
extends RecyclerView.ViewHolder implements FacetProvider

java.lang.Object
   ↳ androidx.recyclerview.widget.RecyclerView.ViewHolder
     ↳ androidx.leanback.widget.ItemBridgeAdapter.ViewHolder


ViewHolder for the ItemBridgeAdapter.

Summary

Inherited fields

Public methods

final Object getExtraObject()

Get extra object associated with the view.

Object getFacet(Class<?> facetClass)

Queries optional implemented facet.

final Object getItem()

Get currently bound object.

final Presenter getPresenter()

Get Presenter.

final Presenter.ViewHolder getViewHolder()

Get Presenter.ViewHolder.

void setExtraObject(Object object)

Set extra object associated with the view.

Inherited methods

Public methods

getExtraObject

public final Object getExtraObject ()

Get extra object associated with the view. Developer can attach any customized UI object in addition to Presenter.ViewHolder. A typical use case is attaching an animator object.

Returns
Object

getFacet

public Object getFacet (Class<?> facetClass)

Queries optional implemented facet.

Parameters
facetClass Class: Facet classes to query, examples are: class of ItemAlignmentFacet.

Returns
Object Facet implementation for the facetClass or null if feature not implemented.

getItem

public final Object getItem ()

Get currently bound object.

Returns
Object

getPresenter

public final Presenter getPresenter ()

Get Presenter.

Returns
Presenter

getViewHolder

public final Presenter.ViewHolder getViewHolder ()

Get Presenter.ViewHolder.

Returns
Presenter.ViewHolder

setExtraObject

public void setExtraObject (Object object)

Set extra object associated with the view. Developer can attach any customized UI object in addition to Presenter.ViewHolder. A typical use case is attaching an animator object.

Parameters
object Object