TabTemplate
@CarProtocol
@RequiresCarApi(value = 6)
public class TabTemplate implements 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
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 multipleTabs, the new template must have the same number of tabs with the same title and icon.
Summary
Nested types |
|---|
public final class TabTemplate.BuilderA builder of |
public interface TabTemplate.TabCallbackA listener for tab selection. |
Public methods |
|
|---|---|
boolean |
|
@NonNull String |
Returns the |
@NonNull Action |
Returns the |
@NonNull TabCallbackDelegate |
Returns the |
@NonNull TabContents |
Returns the |
@NonNull List<Tab> |
getTabs()Returns the list of |
int |
hashCode() |
boolean |
Returns whether the template is loading. |
@NonNull String |
toString() |
Public methods
getActiveTabContentId
public @NonNull String getActiveTabContentId()
Returns the getContentId for the active tab.
getHeaderAction
public @NonNull Action getHeaderAction()
Returns the Action that is set to be displayed in the header of the template, or null if not set.
| See also | |
|---|---|
setHeaderAction |
getTabCallbackDelegate
public @NonNull TabCallbackDelegate getTabCallbackDelegate()
Returns the TabCallbackDelegate for tab related callbacks.
getTabContents
public @NonNull TabContents getTabContents()
Returns the TabContents for the currently active tab.
getTabs
public @NonNull List<Tab> getTabs()
Returns the list of Tabs in the template.
isLoading
public boolean isLoading()
Returns whether the template is loading.
| See also | |
|---|---|
setLoading |