Class CarSection

java.lang.Object
com.codename1.car.CarSection

public class CarSection extends Object
A titled group of CarRows within a CarListTemplate. Maps to a sectioned list (androidx.app.car ItemList with a header / CPListSection). The header may be null for an untitled section.
  • Constructor Details

    • CarSection

      public CarSection()
      Creates an untitled section.
    • CarSection

      public CarSection(String header)

      Creates a section with the supplied header.

      Parameters
      • header: the section header, or null
  • Method Details

    • getHeader

      public String getHeader()
      Returns the section header, or null.
    • setHeader

      public CarSection setHeader(String header)

      Sets the section header.

      Parameters
      • header: the header text, or null for an untitled section
      Returns

      this section, for chaining

    • addRow

      public CarSection addRow(CarRow row)

      Appends a row to the section.

      Parameters
      • row: the row to add
      Returns

      this section, for chaining

    • getRows

      public List<CarRow> getRows()
      Returns the rows in this section, in order.