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.SwitchListItem.ViewHolder

Holds views of SwitchListItem.

Summary

Public constructors

<init>(@NonNull itemView: View)

ViewHolder that contains necessary widgets for SwitchListItem.

Public methods

TextView

ImageView

Switch

View

TextView

Unit

Updates child views with current car UX restrictions.

Inherited functions

Inherited properties

Public constructors

<init>

ViewHolder(@NonNull itemView: View)

ViewHolder that contains necessary widgets for SwitchListItem.

Public methods

getBody

@NonNull fun getBody(): TextView

getPrimaryIcon

@NonNull fun getPrimaryIcon(): ImageView

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.