public class

CarListDialog.DialogSubSection

extends java.lang.Object

 java.lang.Object

↳androidx.car.app.CarListDialog.DialogSubSection

Overview

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

Constructors
publicDialogSubSection(java.lang.CharSequence title, java.lang.CharSequence items[])

Creates a subsection.

Methods
public intgetItemCount()

Returns the total number of items related to this section.

public java.lang.CharSequencegetItems()

Returns the section items.

public java.lang.CharSequencegetTitle()

Returns the section title.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public DialogSubSection(java.lang.CharSequence title, java.lang.CharSequence items[])

Creates a subsection.

Parameters:

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

Methods

public java.lang.CharSequence getTitle()

Returns the section title.

public java.lang.CharSequence getItems()

Returns the section items.

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.