Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

TextListItem.ViewHolder

public static final 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

TextView getBody()
ViewGroup getContainerLayout()
ImageView getPrimaryIcon()
ImageView getSupplementalIcon()
View getSupplementalIconDivider()
Switch getSwitch()
View getSwitchDivider()
TextView getTitle()
void onUxRestrictionsChanged(CarUxRestrictions restrictionsInfo)

Updates child views with current car UX restrictions.

Inherited methods

Public constructors

TextListItem.ViewHolder

public TextListItem.ViewHolder (View itemView)

Parameters
itemView View

Public methods

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

onUxRestrictionsChanged

public void onUxRestrictionsChanged (CarUxRestrictions restrictionsInfo)

Updates child views with current car UX restrictions.

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

Parameters
restrictionsInfo CarUxRestrictions: current car UX restrictions.