Class CarActionStrip

java.lang.Object
com.codename1.car.CarActionStrip

public class CarActionStrip extends Object
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.
  • Constructor Details

    • CarActionStrip

      public CarActionStrip()
  • Method Details

    • addAction

      public CarActionStrip addAction(CarAction action)

      Adds an action to the strip.

      Parameters
      • action: 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: the action label

      • listener: the activation callback

      Returns

      this strip, for chaining

    • getActions

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