ItemBridgeAdapter.ViewHolder

public class ItemBridgeAdapter.ViewHolder extends RecyclerView.ViewHolder implements FacetProvider


ViewHolder for the ItemBridgeAdapter.

Summary

Public methods

final Object

Get extra object associated with the view.

Object
getFacet(Class<Object> facetClass)

Queries optional implemented facet.

final Object

Get currently bound object.

final Presenter

Get Presenter.

final Presenter.ViewHolder

Get Presenter.ViewHolder.

void

Set extra object associated with the view.

Inherited methods

From androidx.recyclerview.widget.RecyclerView.ViewHolder
final int

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

final int

This method is deprecated.

This method is confusing when adapters nest other adapters.

final @Nullable RecyclerView.Adapter<RecyclerView.ViewHolder>

Returns the Adapter that last bound this ViewHolder.

final int

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

final long

Returns The itemId represented by this ViewHolder.

final int
final int

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

final int

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

final int

This method is deprecated.

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

final boolean
final void
setIsRecyclable(boolean recyclable)

Informs the recycler whether this item can be recycled.

String

Public methods

getExtraObject

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

getFacet

Added in 1.2.0-alpha04
public Object getFacet(Class<Object> facetClass)

Queries optional implemented facet.

Parameters
Class<Object> facetClass

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 1.1.0
public final Object getItem()

Get currently bound object.

getPresenter

Added in 1.1.0
public final Presenter getPresenter()

Get Presenter.

getViewHolder

Added in 1.1.0
public final Presenter.ViewHolder getViewHolder()

Get Presenter.ViewHolder.

setExtraObject

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