Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 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
View

TextView

View

ImageView

Unit

Updates child views with current car UX restrictions.

TextView

Switch

ImageView

ViewGroup

Inherited functions
Inherited properties

Public constructors

<init>

ViewHolder(itemView: View!)

Public methods

getSupplementalIconDivider

@NonNull fun getSupplementalIconDivider(): View

getTitle

@NonNull fun getTitle(): TextView

getSwitchDivider

@NonNull fun getSwitchDivider(): View

getSupplementalIcon

@NonNull fun getSupplementalIcon(): ImageView

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.

getBody

@NonNull fun getBody(): TextView

getSwitch

@NonNull fun getSwitch(): Switch

getPrimaryIcon

@NonNull fun getPrimaryIcon(): ImageView

getContainerLayout

@NonNull fun getContainerLayout(): ViewGroup