belongs to Maven artifact androidx.car:car:1.0.0-alpha1

TextListItem.ViewHolder

public static class TextListItem.ViewHolder
extends ListItem.ViewHolder

java.lang.Object
   ↳ androidx.recyclerview.widget.RecyclerView.ViewHolder
     ↳ androidx.car.widget.ListItem.ViewHolder
       ↳ androidx.car.widget.TextListItem.ViewHolder


Holds views of TextListItem.

Summary

Inherited fields

Public constructors

TextListItem.ViewHolder(View itemView)

Public methods

Button getAction1()
View getAction1Divider()
Button getAction2()
View getAction2Divider()
TextView getBody()
RelativeLayout getContainerLayout()
ImageView getPrimaryIcon()
ImageView getSupplementalIcon()
View getSupplementalIconDivider()
Switch getSwitch()
View getSwitchDivider()
TextView getTitle()

Protected methods

void complyWithUxRestrictions(CarUxRestrictions restrictions)

Update children views to comply with car UX restrictions.

Inherited methods

Public constructors

TextListItem.ViewHolder

TextListItem.ViewHolder (View itemView)

Parameters
itemView View

Public methods

getAction1

Button getAction1 ()

Returns
Button

getAction1Divider

View getAction1Divider ()

Returns
View

getAction2

Button getAction2 ()

Returns
Button

getAction2Divider

View getAction2Divider ()

Returns
View

getBody

TextView getBody ()

Returns
TextView

getContainerLayout

RelativeLayout getContainerLayout ()

Returns
RelativeLayout

getPrimaryIcon

ImageView getPrimaryIcon ()

Returns
ImageView

getSupplementalIcon

ImageView getSupplementalIcon ()

Returns
ImageView

getSupplementalIconDivider

View getSupplementalIconDivider ()

Returns
View

getSwitch

Switch getSwitch ()

Returns
Switch

getSwitchDivider

View getSwitchDivider ()

Returns
View

getTitle

TextView getTitle ()

Returns
TextView

Protected methods

complyWithUxRestrictions

void complyWithUxRestrictions (CarUxRestrictions restrictions)

Update children views to comply with car UX restrictions.

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

Parameters
restrictions CarUxRestrictions: current car UX restrictions.