Class CarPaneTemplate
java.lang.Object
com.codename1.car.CarTemplate
com.codename1.car.CarPaneTemplate
A detail pane: a handful of informational
CarRows (label / value lines) plus up to two action
buttons. Use it for a POI detail card, a "now connected" status, or a confirmation screen. Maps
to androidx.car.app.model.PaneTemplate and CPInformationTemplate.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a pane action button (the head unit displays at most two).Adds an informational row (its title is the label, its text the value).Returns the pane action buttons, in order.Returns the header action strip, or null.getRows()Returns the informational rows, in order.booleanReturns true when the pane should render a loading spinner instead of content.setHeaderActions(CarActionStrip headerActions) Sets the header action strip.setLoading(boolean loading) Marks the template as loading; the head unit renders a spinner.Sets the header title.Methods inherited from class CarTemplate
getTitle
-
Constructor Details
-
CarPaneTemplate
public CarPaneTemplate()
-
-
Method Details
-
setTitle
Sets the header title.
Parameters
title: the header title
Returns
this template, for chaining
-
addRow
Adds an informational row (its title is the label, its text the value).
Parameters
row: the row to add
Returns
this template, for chaining
-
getRows
-
addAction
Adds a pane action button (the head unit displays at most two).
Parameters
action: the action button to add
Returns
this template, for chaining
-
getActions
-
getHeaderActions
Returns the header action strip, or null. -
setHeaderActions
Sets the header action strip.
Parameters
headerActions: the action strip
Returns
this template, for chaining
-
isLoading
public boolean isLoading()Returns true when the pane should render a loading spinner instead of content. -
setLoading
Marks the template as loading; the head unit renders a spinner.
Parameters
loading: true to show a spinner
Returns
this template, for chaining
-