TabContents.Builder

public final class TabContents.Builder


A builder of TabContents.

Summary

Public constructors

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

Public methods

@NonNull TabContents

Constructs the TabContents defined by this builder.

Public constructors

Builder

Added in 1.3.0
public Builder(@NonNull 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 templates types are 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

Public methods

build

Added in 1.3.0
public @NonNull TabContents build()

Constructs the TabContents defined by this builder.