ViewHolder

open class ViewHolder : ListItem.ViewHolder
kotlin.Any
   ↳ androidx.recyclerview.widget.RecyclerView.ViewHolder
   ↳ androidx.car.widget.ListItem.ViewHolder
   ↳ androidx.car.widget.TextListItem.ViewHolder

Holds views of TextListItem.

Summary

Public constructors
<init>(itemView: View!)

Public methods
open View

open View

open TextView

open Button

open View

open Button

open ImageView

open View

open TextView

open Switch

open ImageView

open ViewGroup

Protected methods
open Unit
applyUxRestrictions(@NonNull restrictions: CarUxRestrictions)

Applies car UX restrictions to child views.

Inherited functions
Inherited properties

Public constructors

<init>

ViewHolder(itemView: View!)

Public methods

getAction2Divider

@NonNull open fun getAction2Divider(): View

getSupplementalIconDivider

@NonNull open fun getSupplementalIconDivider(): View

getTitle

@NonNull open fun getTitle(): TextView

getAction2

@NonNull open fun getAction2(): Button

getSwitchDivider

@NonNull open fun getSwitchDivider(): View

getAction1

@NonNull open fun getAction1(): Button

getSupplementalIcon

@NonNull open fun getSupplementalIcon(): ImageView

getAction1Divider

@NonNull open fun getAction1Divider(): View

getBody

@NonNull open fun getBody(): TextView

getSwitch

@NonNull open fun getSwitch(): Switch

getPrimaryIcon

@NonNull open fun getPrimaryIcon(): ImageView

getContainerLayout

@NonNull open fun getContainerLayout(): ViewGroup

Protected methods

applyUxRestrictions

protected open fun applyUxRestrictions(@NonNull restrictions: CarUxRestrictions): Unit

Applies car UX restrictions to child views.

Body text might be truncated to meet length limit required by regulation.

Parameters
restrictions CarUxRestrictions: current car UX restrictions.