added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0-beta01

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

added in version 1.0.0
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

added in version 1.0.0
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

added in version 1.0.0
public final Object getItem ()

Get currently bound object.

Returns
Object

getPresenter

added in version 1.0.0
public final Presenter getPresenter ()

Get Presenter.

Returns
Presenter

getViewHolder

added in version 1.0.0
public final Presenter.ViewHolder getViewHolder ()

Get Presenter.ViewHolder.

Returns
Presenter.ViewHolder

setExtraObject

added in version 1.0.0
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