TypeScript API
Listtemplate

Class: ListTemplate

A hierarchical list of menu items can be displayed on the CarPlay screen using a list template.

The List Template allows navigation apps to present a hierarchical list of menu items. It includes a navigation bar and a list view.

The navigation bar includes a title, and up to two (2) leading buttons and two (2) trailing buttons. You can customize the appearance of these buttons with icons or text.

Each item in the list view may include an icon, title, subtitle, and an optional disclosure indicator indicating the presence of a submenu. The depth of the menu hierarchy may not exceed 5 levels. Note that some cars limit the total number of items that may be shown in a list.

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ListTemplate(config): ListTemplate

Parameters

NameType
configListTemplateConfig

Returns

ListTemplate

Overrides

Template.constructor

Defined in

packages/react-native-carplay/src/templates/ListTemplate.ts:116 (opens in a new tab)

Properties

config

config: ListTemplateConfig

Inherited from

Template.config

Defined in

packages/react-native-carplay/src/templates/ListTemplate.ts:116 (opens in a new tab)


id

id: string

Inherited from

Template.id

Defined in

packages/react-native-carplay/src/templates/Template.ts:86 (opens in a new tab)

Accessors

eventMap

get eventMap(): Object

Returns

Object

NameType
backButtonPressedstring

Overrides

Template.eventMap

Defined in

packages/react-native-carplay/src/templates/ListTemplate.ts:110 (opens in a new tab)


type

get type(): string

Returns

string

Overrides

Template.type

Defined in

packages/react-native-carplay/src/templates/ListTemplate.ts:106 (opens in a new tab)

Methods

getMaximumListItemCount

getMaximumListItemCount(): Promise<number>

Returns

Promise<number>

Defined in

packages/react-native-carplay/src/templates/ListTemplate.ts:143 (opens in a new tab)


getMaximumListSectionCount

getMaximumListSectionCount(): Promise<number>

Returns

Promise<number>

Defined in

packages/react-native-carplay/src/templates/ListTemplate.ts:147 (opens in a new tab)


parseConfig

parseConfig(config): any

Parameters

NameType
configany

Returns

any

Inherited from

Template.parseConfig

Defined in

packages/react-native-carplay/src/templates/Template.ts:147 (opens in a new tab)


updateListTemplateItem

updateListTemplateItem(config): void

Parameters

NameType
configListItemUpdate

Returns

void

Defined in

packages/react-native-carplay/src/templates/ListTemplate.ts:135 (opens in a new tab)


updateSections

updateSections(sections): void

Parameters

NameType
sectionsListSection[]

Returns

void

Defined in

packages/react-native-carplay/src/templates/ListTemplate.ts:130 (opens in a new tab)


updateTemplate

updateTemplate(config): void

Parameters

NameType
configP

Returns

void

Inherited from

Template.updateTemplate

Defined in

packages/react-native-carplay/src/templates/Template.ts:141 (opens in a new tab)