public class CarActionStrip
- Object
- 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
actionCarAction- 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
titleString- the action label
listenerCarActionListener- the activation callback
Returns
this strip, for chaining
getActions
public List<CarAction> getActions()Returns the actions in this strip, in order.