第二个 Android 11 开发者预览版现已推出,快来测试并分享您的反馈吧

ListItem.ViewHolder

public static abstract class ListItem.ViewHolder
extends RecyclerView.ViewHolder implements OnUxRestrictionsChangedListener

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.

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.