belongs to Maven artifact androidx.car:car:1.0.0-alpha1

ListItem.ViewHolder

public static abstract class ListItem.ViewHolder
extends RecyclerView.ViewHolder

java.lang.Object
   ↳ androidx.recyclerview.widget.RecyclerView.ViewHolder
     ↳ androidx.car.widget.ListItem.ViewHolder


ViewHolder that supports ListItem.ViewBinder.

Summary

Inherited fields

Public constructors

ListItem.ViewHolder(View itemView)

Public methods

final void addCleanUp(ViewBinder<ListItem.ViewHolder> cleanUp)

Stores clean up ViewBinders that will be called in cleanUp().

final void cleanUp()

Removes customization from previous ListItem.

Protected methods

abstract void complyWithUxRestrictions(CarUxRestrictions restrictions)

Update children views to comply with UX restriction changes.

Inherited methods

Public constructors

ListItem.ViewHolder

ListItem.ViewHolder (View itemView)

Parameters
itemView View

Public methods

addCleanUp

void addCleanUp (ViewBinder<ListItem.ViewHolder> cleanUp)

Stores clean up ViewBinders that will be called in cleanUp().

Parameters
cleanUp ViewBinder

cleanUp

void cleanUp ()

Removes customization from previous ListItem. Intended to be used when this ViewHolder is bound to a ListItem.

Protected methods

complyWithUxRestrictions

void complyWithUxRestrictions (CarUxRestrictions restrictions)

Update children views to comply with UX restriction changes.

Parameters
restrictions CarUxRestrictions: current car UX restrictions.