TabContents.Builder


class TabContents.Builder


A builder of TabContents.

Summary

Public constructors

Builder(template: Template)

Creates a TabContents.Builder instance using the given Template to display as contents.

@ExperimentalCarApi
Builder(template: Template, enableApi8: Boolean)

Creates a TabContents.Builder instance using the given Template to display as contents.

Public functions

TabContents

Constructs the TabContents defined by this builder.

Public constructors

Builder

Added in 1.3.0
Builder(template: Template)

Creates a TabContents.Builder instance using the given Template to display as contents.

There should be no title, Header Action or ActionStrip set on the template. The host will ignore these.

From Car API 6 onward, the following template types are supported as content:

  • ListTemplate
  • PaneTemplate
  • GridTemplate
  • MessageTemplate
  • SearchTemplate

From Car API 7 onward, the following template type is supported as content in addition to all previously supported template types:

  • NavigationTemplate
Throws
java.lang.NullPointerException

if template is null

java.lang.IllegalArgumentException

if template does not meet the requirements

Builder

Added in 1.7.0-beta03
@ExperimentalCarApi
Builder(template: Template, enableApi8: Boolean)

Creates a TabContents.Builder instance using the given Template to display as contents. Additional template types are enabled if enableApi8 is set to true.

There should be no title, Header Action or ActionStrip set on the template. The host will ignore these.

From Car API 6 onward, the following template types are supported as content:

  • ListTemplate
  • PaneTemplate
  • GridTemplate
  • MessageTemplate
  • SearchTemplate

From Car API 7 onward, the following template type is supported as content in addition to all previously supported template types:

  • NavigationTemplate

From Car API 8 onward, the following template type is supported as content in addition to all previously supported template types:

  • SectionedItemTemplate
Throws
java.lang.NullPointerException

if template is null

java.lang.IllegalArgumentException

if template does not meet the requirements

Public functions

build

Added in 1.3.0
fun build(): TabContents

Constructs the TabContents defined by this builder.