Register now for Android Dev Summit 2019!

ViewHolder

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

TextView

ViewGroup

ImageView

ImageView

View

Switch

View

TextView

Unit

Updates child views with current car UX restrictions.

Inherited functions

Inherited properties

Public constructors

<init>

ViewHolder(itemView: View!)

Public methods

getBody

@NonNull fun getBody(): TextView

getContainerLayout

@NonNull fun getContainerLayout(): ViewGroup

getPrimaryIcon

@NonNull fun getPrimaryIcon(): ImageView

getSupplementalIcon

@NonNull fun getSupplementalIcon(): ImageView

getSupplementalIconDivider

@NonNull fun getSupplementalIconDivider(): View

getSwitch

@NonNull fun getSwitch(): Switch

getSwitchDivider

@NonNull fun getSwitchDivider(): View

getTitle

@NonNull fun getTitle(): TextView

onUxRestrictionsChanged

fun onUxRestrictionsChanged(restrictionsInfo: CarUxRestrictions!): Unit

Updates child views with current car UX restrictions.

Text might be truncated to meet length limit required by regulation.

Parameters
restrictionInfo CarUxRestrictions!: The new UX restriction information
restrictionsInfo CarUxRestrictions!: current car UX restrictions.