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()
ViewGroup getContainerLayout()
ImageView getPrimaryIcon()
ImageView getSupplementalIcon()
View getSupplementalIconDivider()
Switch getSwitch()
View getSwitchDivider()
TextView getTitle()

Protected methods

void applyUxRestrictions(CarUxRestrictions restrictions)

Applies car UX restrictions to child views.

Inherited methods

Public constructors

TextListItem.ViewHolder

public TextListItem.ViewHolder (View itemView)

Parameters
itemView View

Public methods

getAction1

public Button getAction1 ()

Returns
Button

getAction1Divider

public View getAction1Divider ()

Returns
View

getAction2

public Button getAction2 ()

Returns
Button

getAction2Divider

public View getAction2Divider ()

Returns
View

getBody

public TextView getBody ()

Returns
TextView

getContainerLayout

public ViewGroup getContainerLayout ()

Returns
ViewGroup

getPrimaryIcon

public ImageView getPrimaryIcon ()

Returns
ImageView

getSupplementalIcon

public ImageView getSupplementalIcon ()

Returns
ImageView

getSupplementalIconDivider

public View getSupplementalIconDivider ()

Returns
View

getSwitch

public Switch getSwitch ()

Returns
Switch

getSwitchDivider

public View getSwitchDivider ()

Returns
View

getTitle

public TextView getTitle ()

Returns
TextView

Protected methods

applyUxRestrictions

protected void applyUxRestrictions (CarUxRestrictions restrictions)

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.