Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!

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 applyUxRestrictions(CarUxRestrictions restrictions)

Applies UX restriction changes to child views.

Inherited methods

Public constructors

ListItem.ViewHolder

public ListItem.ViewHolder (View itemView)

Parameters
itemView View

Public methods

addCleanUp

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

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

Parameters
cleanUp ViewBinder

cleanUp

public final void cleanUp ()

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

Protected methods

applyUxRestrictions

protected abstract void applyUxRestrictions (CarUxRestrictions restrictions)

Applies UX restriction changes to child views.

Parameters
restrictions CarUxRestrictions: current car UX restrictions.