TabTemplate


@CarProtocol
@RequiresCarApi(value = 6)
class TabTemplate : Template


A template representing a list of tabs and contents for the active tab.

Template Restrictions In regards to template refreshes, as described in onGetTemplate, this template is considered a refresh of a previous one if:
  • The previous template is in a loading state (see setLoading} , or
  • The Tabs structure between the templates has not changed and if the new template has the same active tab then the contents of that tab hasn't changed. This means that if the previous template has multiple Tabs, the new template must have the same number of tabs with the same title and icon.

Summary

Nested types

A builder of TabTemplate.

A listener for tab selection.

Public functions

Boolean
equals(other: Any?)
String

Returns the getContentId for the active tab.

Action

Returns the Action that is set to be displayed in the header of the template, or null if not set.

TabCallbackDelegate

Returns the TabCallbackDelegate for tab related callbacks.

TabContents

Returns the TabContents for the currently active tab.

(Mutable)List<Tab!>

Returns the list of Tabs in the template.

Int
Boolean

Returns whether the template is loading.

String

Public functions

equals

fun equals(other: Any?): Boolean

getActiveTabContentId

Added in 1.4.0
fun getActiveTabContentId(): String

Returns the getContentId for the active tab.

getHeaderAction

Added in 1.3.0
fun getHeaderAction(): Action

Returns the Action that is set to be displayed in the header of the template, or null if not set.

See also
setHeaderAction

getTabCallbackDelegate

Added in 1.3.0
fun getTabCallbackDelegate(): TabCallbackDelegate

Returns the TabCallbackDelegate for tab related callbacks.

getTabContents

Added in 1.3.0
fun getTabContents(): TabContents

Returns the TabContents for the currently active tab.

getTabs

Added in 1.3.0
fun getTabs(): (Mutable)List<Tab!>

Returns the list of Tabs in the template.

hashCode

fun hashCode(): Int

isLoading

Added in 1.3.0
fun isLoading(): Boolean

Returns whether the template is loading.

See also
setLoading

toString

fun toString(): String