Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

DialogSubSection

open class DialogSubSection
kotlin.Any
   ↳ androidx.car.app.CarListDialog.DialogSubSection

A struct that holds data for a section. A section is a combination of the section title and the list of items associated with that section.

Summary

Public constructors
<init>(@NonNull title: CharSequence, @NonNull items: Array<CharSequence!>)

Creates a subsection.

Public methods
open Array<CharSequence!>

Returns the section items.

open Int

Returns the total number of items related to this section.

open CharSequence

Returns the section title.

Public constructors

<init>

DialogSubSection(@NonNull title: CharSequence, @NonNull items: Array<CharSequence!>)

Creates a subsection.

Parameters
title CharSequence: The title of the section. Must be non-empty.
items CharSequence: A list of items associated with this section. This list cannot be null or empty.

Public methods

getItems

@NonNull open fun getItems(): Array<CharSequence!>

Returns the section items.

getItemCount

open fun getItemCount(): Int

Returns the total number of items related to this section. The length of the section is defined as the number of items plus an entry for the title of the section.

This value will always be greater than 0 due to the fact that the title must always be specified and the number of items passed to this DialogSubSection should always be greater than 0.

getTitle

@NonNull open fun getTitle(): CharSequence

Returns the section title.