CarListDialog.DialogSubSection
public
static
class
CarListDialog.DialogSubSection
extends Object
| java.lang.Object | |
| ↳ | 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 | |
|---|---|
CarListDialog.DialogSubSection(CharSequence title, CharSequence[] items)
Creates a subsection. |
|
Public methods | |
|---|---|
int
|
getItemCount()
Returns the total number of items related to this section. |
CharSequence[]
|
getItems()
Returns the section items. |
CharSequence
|
getTitle()
Returns the section title. |
Inherited methods | |
|---|---|
Public constructors
CarListDialog.DialogSubSection
public CarListDialog.DialogSubSection (CharSequence title,
CharSequence[] items)
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
getItemCount
public int getItemCount ()
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.
| Returns | |
|---|---|
int |
|
getItems
public CharSequence[] getItems ()
Returns the section items.
| Returns | |
|---|---|
CharSequence[] |
|
getTitle
public CharSequence getTitle ()
Returns the section title.
| Returns | |
|---|---|
CharSequence |
|