public class CarActionStrip

  1. Object
  2. CarActionStrip
An ordered set of CarActions shown together in a head-unit action bar – a template header strip or the navigation map controls. Maps to androidx.car.app.model.ActionStrip and to a CPBarButton array on CarPlay. Head units cap the number of visible actions (typically 2-4); add the most important first.

Constructors

public CarActionStrip()

Methods

public CarActionStrip addAction(CarAction action)Adds an action to the strip.
public CarActionStrip addAction(String title, CarActionListener listener)Convenience that builds a CarAction from a title and listener and appends it.
public List<CarAction> getActions()Returns the actions in this strip, in order.

Inherited methods

Constructor details

CarActionStrip

public CarActionStrip()

Method details

addAction

public CarActionStrip addAction(CarAction action)
Adds an action to the strip.

Parameters

action CarAction
the action to append

Returns

this strip, for chaining

addAction

public CarActionStrip addAction(String title, CarActionListener listener)
Convenience that builds a CarAction from a title and listener and appends it.

Parameters

title String
the action label
listener CarActionListener
the activation callback

Returns

this strip, for chaining

getActions

public List<CarAction> getActions()
Returns the actions in this strip, in order.