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 inonGetTemplate
, this template is considered a refresh of a previous one if:
- The previous template is in a loading state (see
setLoading
} , or - The
Tab
s 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 multipleTab
s, the new template must have the same number of tabs with the same title and icon.
Summary
Nested types |
---|
class TabTemplate.Builder A builder of |
interface TabTemplate.TabCallback A listener for tab selection. |
Public functions |
|
---|---|
Boolean |
|
String |
Returns the |
Action |
Returns the |
TabCallbackDelegate |
Returns the |
TabContents |
Returns the |
(Mutable)List<Tab!> |
getTabs() Returns the list of |
Int |
hashCode() |
Boolean |
Returns whether the template is loading. |
String |
toString() |
Public functions
getActiveTabContentId
fun getActiveTabContentId(): String
Returns the getContentId
for the active tab.
getHeaderAction
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
fun getTabCallbackDelegate(): TabCallbackDelegate
Returns the TabCallbackDelegate
for tab related callbacks.
getTabContents
fun getTabContents(): TabContents
Returns the TabContents
for the currently active tab.
isLoading
fun isLoading(): Boolean
Returns whether the template is loading.
See also | |
---|---|
setLoading |