Register now for Android Dev Summit 2019!

ViewHolder

open class ViewHolder : RecyclerView.ViewHolder, FacetProvider
kotlin.Any
   ↳ androidx.recyclerview.widget.RecyclerView.ViewHolder
   ↳ androidx.leanback.widget.ItemBridgeAdapter.ViewHolder

ViewHolder for the ItemBridgeAdapter.

Summary

Public methods

Any!

Get extra object associated with the view.

open Any!
getFacet(facetClass: Class<*>!)

Any!

Get currently bound object.

Presenter!

Get Presenter.

Presenter.ViewHolder!

Get Presenter.ViewHolder.

open Unit
setExtraObject(object: Any!)

Set extra object associated with the view.

Inherited functions

Inherited properties

Public methods

getExtraObject

fun getExtraObject(): Any!

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.

getFacet

open fun getFacet(facetClass: Class<*>!): Any!

getItem

fun getItem(): Any!

Get currently bound object.

getPresenter

fun getPresenter(): Presenter!

Get Presenter.

getViewHolder

fun getViewHolder(): Presenter.ViewHolder!

Get Presenter.ViewHolder.

setExtraObject

open fun setExtraObject(object: Any!): Unit

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.