RoutePreviewNavigationTemplateController
public
class
RoutePreviewNavigationTemplateController
extends Object
java.lang.Object | |
↳ | com.google.android.libraries.car.app.testing.navigation.model.RoutePreviewNavigationTemplateController |
A controller that allows testing of a RoutePreviewNavigationTemplate
.
This controller allows:
- Retrieving the title set via
RoutePreviewNavigationTemplate.Builder.setTitle(CharSequence)
. - Retrieving the loading state set via
RoutePreviewNavigationTemplate.Builder.setIsLoading(boolean)
. - Retrieving the navigate action set via
RoutePreviewNavigationTemplate.Builder.setNavigateAction(Action)
. - Retrieving the
ItemList
set viaRoutePreviewNavigationTemplate.Builder.setItemList(ItemList)
. - Retrieving a
Row
by title that is in theItemList
. - Retrieving the header
Action
which is set viaRoutePreviewNavigationTemplate.Builder.setHeaderAction(Action)
. - Retrieving the
ActionStrip
set viaRoutePreviewNavigationTemplate.Builder.setActionStrip(ActionStrip)
.
Summary
Public methods | |
---|---|
RoutePreviewNavigationTemplate
|
get()
Retrieves the |
ActionStripController
|
getActionStrip()
Returns an |
ActionController
|
getHeaderAction()
Retrieves a |
ItemListController
|
getItemList()
Returns an |
ActionController
|
getNavigateAction()
Returns an |
RowController
|
getRowByTitle(String title)
Returns a |
String
|
getTitle()
Retrieves the title set in the |
boolean
|
isLoading()
Returns |
static
RoutePreviewNavigationTemplateController
|
of(RoutePreviewNavigationTemplate routePreviewNavigationTemplate)
Creates a |
Inherited methods | |
---|---|
Public methods
get
public RoutePreviewNavigationTemplate get ()
Retrieves the RoutePreviewNavigationTemplate
that this controller is controlling.
Returns | |
---|---|
RoutePreviewNavigationTemplate |
getActionStrip
public ActionStripController getActionStrip ()
Returns an ActionStripController
that contains the ActionStrip
in the RoutePreviewNavigationTemplate
that is being controlled, or null
if one is not
present.
Returns | |
---|---|
ActionStripController |
getHeaderAction
public ActionController getHeaderAction ()
Retrieves a ActionController
for the header Action
that is being controlled, or
null
if none is present.
Returns | |
---|---|
ActionController |
getItemList
public ItemListController getItemList ()
Returns an ItemListController
that contains the ItemList
in the RoutePreviewNavigationTemplate
that is being controlled.
Returns | |
---|---|
ItemListController |
getNavigateAction
public ActionController getNavigateAction ()
Returns an ActionController
that contains the navigate action in the RoutePreviewNavigationTemplateController
being controlled, or null
if one is not
present.
Returns | |
---|---|
ActionController |
getRowByTitle
public RowController getRowByTitle (String title)
Returns a RowController
that contains the first Row
in the ItemList
,
which has the given title as its title, or null
if one is not present.
The value should be the CharSequence.toString()
for the title originally provided.
Parameters | |
---|---|
title |
String |
Returns | |
---|---|
RowController |
getTitle
public String getTitle ()
Retrieves the title set in the RoutePreviewNavigationTemplate
that is being controlled,
or null
if none is present.
The value returned is the CharSequence.toString()
for the title originally provided.
Returns | |
---|---|
String |
isLoading
public boolean isLoading ()
Returns true
if the template is set to be loading.
This state is set via calling RoutePreviewNavigationTemplate.Builder.setIsLoading(boolean)
.
Returns | |
---|---|
boolean |
of
public static RoutePreviewNavigationTemplateController of (RoutePreviewNavigationTemplate routePreviewNavigationTemplate)
Creates a RoutePreviewNavigationTemplateController
to control an RoutePreviewNavigationTemplate
for testing.
Parameters | |
---|---|
routePreviewNavigationTemplate |
RoutePreviewNavigationTemplate |
Returns | |
---|---|
RoutePreviewNavigationTemplateController |