Register now for Android Dev Summit 2019!

ActionListItem.ViewHolder

public static final class ActionListItem.ViewHolder
extends ListItem.ViewHolder

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


Holds the children views of ActionListItem.

Summary

Inherited fields

Public constructors

ActionListItem.ViewHolder(View itemView)

Public methods

TextView getBody()
Button getPrimaryAction()
View getPrimaryActionDivider()
ImageView getPrimaryIcon()
Button getSecondaryAction()
View getSecondaryActionDivider()
TextView getTitle()
void onUxRestrictionsChanged(CarUxRestrictions restrictions)
void setActionBorderless(boolean isBorderless)

Sets if the action returned is styled as borderless or non-borderless.

Inherited methods

Public constructors

ActionListItem.ViewHolder

public ActionListItem.ViewHolder (View itemView)

Parameters
itemView View

Public methods

getBody

public TextView getBody ()

Returns
TextView

getPrimaryAction

public Button getPrimaryAction ()

Returns
Button

getPrimaryActionDivider

public View getPrimaryActionDivider ()

Returns
View

getPrimaryIcon

public ImageView getPrimaryIcon ()

Returns
ImageView

getSecondaryAction

public Button getSecondaryAction ()

Returns
Button

getSecondaryActionDivider

public View getSecondaryActionDivider ()

Returns
View

getTitle

public TextView getTitle ()

Returns
TextView

onUxRestrictionsChanged

public void onUxRestrictionsChanged (CarUxRestrictions restrictions)

Parameters
restrictions CarUxRestrictions

setActionBorderless

public void setActionBorderless (boolean isBorderless)

Sets if the action returned is styled as borderless or non-borderless.

By default, this value is true.

Parameters
isBorderless boolean: Whether or not the action is borderless.