ItemBridgeAdapter.ViewHolder

class ItemBridgeAdapter.ViewHolder : RecyclerView.ViewHolder, FacetProvider


ViewHolder for the ItemBridgeAdapter.

Summary

Public functions

Any!

Get extra object associated with the view.

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

Queries optional implemented facet.

Any!

Get currently bound object.

Presenter!

Get Presenter.

Presenter.ViewHolder!

Get Presenter.ViewHolder.

Unit
setExtraObject(object: Any!)

Set extra object associated with the view.

Inherited functions

From androidx.recyclerview.widget.RecyclerView.ViewHolder
Int

Returns the Adapter position of the item represented by this ViewHolder with respect to the RecyclerView's Adapter.

Int

This function is deprecated.

This method is confusing when adapters nest other adapters.

RecyclerView.Adapter<RecyclerView.ViewHolder!>?

Returns the Adapter that last bound this ViewHolder.

Int

Returns the Adapter position of the item represented by this ViewHolder with respect to the Adapter that bound it.

Long

Returns The itemId represented by this ViewHolder.

Int
Int

Returns the position of the ViewHolder in terms of the latest layout pass.

Int

When LayoutManager supports animations, RecyclerView tracks 3 positions for ViewHolders to perform animations.

Int

This function is deprecated.

This method is deprecated because its meaning is ambiguous due to the async handling of adapter updates.

Boolean
Unit
setIsRecyclable(recyclable: Boolean)

Informs the recycler whether this item can be recycled.

String!

Public functions

getExtraObject

Added in 1.1.0
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

Added in 1.2.0-alpha04
fun getFacet(facetClass: Class<Any!>!): Any!

Queries optional implemented facet.

Parameters
facetClass: Class<Any!>!

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

Returns
Any!

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

getItem

Added in 1.1.0
fun getItem(): Any!

Get currently bound object.

getPresenter

Added in 1.1.0
fun getPresenter(): Presenter!

Get Presenter.

getViewHolder

Added in 1.1.0
fun getViewHolder(): Presenter.ViewHolder!

Get Presenter.ViewHolder.

setExtraObject

Added in 1.1.0
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.