TabContents.Builder
public final class TabContents.Builder
A builder of TabContents.
Summary
Public constructors |
|---|
|
Creates a |
@ExperimentalCarApiCreates a |
Public methods |
|
|---|---|
@NonNull TabContents |
build()Constructs the |
Public constructors
Builder
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:
ListTemplatePaneTemplateGridTemplateMessageTemplateSearchTemplate
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 |
java.lang.IllegalArgumentException |
if |
Builder
@ExperimentalCarApi
public Builder(@NonNull Template template, boolean enableApi8)
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:
ListTemplatePaneTemplateGridTemplateMessageTemplateSearchTemplate
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 |
java.lang.IllegalArgumentException |
if |
Public methods
build
public @NonNull TabContents build()
Constructs the TabContents defined by this builder.