PlaceListMapTemplateController
public
class
PlaceListMapTemplateController
extends Object
java.lang.Object | |
↳ | com.google.android.libraries.car.app.testing.model.PlaceListMapTemplateController |
A controller that allows testing of a PlaceListMapTemplate
.
This controller allows:
- Verifying if the
PlaceListMapTemplate
was set to show current location viaPlaceListMapTemplate.Builder.setCurrentLocationEnabled(boolean)
. - Retrieving title set via
PlaceListMapTemplate.Builder.setTitle(CharSequence)
. - Retrieving the loading state set via
PlaceListMapTemplate.Builder.setIsLoading(boolean)
. - Retrieving the
ItemList
set viaPlaceListMapTemplate.Builder.setItemList(ItemList)
. - Retrieving a
Row
from theItemList
by title. - Retrieving the header
Action
which is set viaPlaceListMapTemplate.Builder.setHeaderAction(Action)
. - Retrieving the
ActionStrip
set viaPlaceListMapTemplate.Builder.setActionStrip(ActionStrip)
. - Retrieving the
Place
set viaPlaceListMapTemplate.Builder.setAnchor(Place)
.
Summary
Public methods | |
---|---|
PlaceListMapTemplate
|
get()
Retrieves the |
ActionStripController
|
getActionStrip()
Returns an |
PlaceController
|
getAnchor()
Returns a |
ActionController
|
getHeaderAction()
Retrieves a |
ItemListController
|
getItemList()
Returns an |
RowController
|
getRowByTitle(String title)
Returns a |
String
|
getTitle()
Retrieves the title set in the |
boolean
|
isCurrentLocationEnabled()
Returns whether the current location should be shown. |
boolean
|
isLoading()
Returns |
static
PlaceListMapTemplateController
|
of(PlaceListMapTemplate placeListMapTemplate)
Creates a |
Inherited methods | |
---|---|
Public methods
get
public PlaceListMapTemplate get ()
Retrieves the PlaceListMapTemplate
that this controller is controlling.
Returns | |
---|---|
PlaceListMapTemplate |
getActionStrip
public ActionStripController getActionStrip ()
Returns an ActionStripController
that contains the ActionStrip
in the PlaceListMapTemplate
that is being controlled, or null
if one is not present.
Returns | |
---|---|
ActionStripController |
getAnchor
public PlaceController getAnchor ()
Returns a PlaceController
that contains the Place
that is set as an anchor, or
null
if one is not present.
Returns | |
---|---|
PlaceController |
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 PlaceListMapTemplate
that is being controlled.
Returns | |
---|---|
ItemListController |
getRowByTitle
public RowController getRowByTitle (String title)
Returns a RowController
containing the first Row
that was added with the given
title as its title, in the ItemList
contained in the PlaceListMapTemplate
that
is being controlled, or null
if none match.
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 PlaceListMapTemplate
that is being controlled, or null
if none is present.
The value returned is the CharSequence.toString()
for the title originally provided.
Returns | |
---|---|
String |
isCurrentLocationEnabled
public boolean isCurrentLocationEnabled ()
Returns whether the current location should be shown.
Returns | |
---|---|
boolean |
isLoading
public boolean isLoading ()
Returns true
if the template is set to be loading.
This state is set via calling PlaceListMapTemplate.Builder.setIsLoading(boolean)
.
Returns | |
---|---|
boolean |
of
public static PlaceListMapTemplateController of (PlaceListMapTemplate placeListMapTemplate)
Creates a PlaceListMapTemplateController
to control an PlaceListMapTemplate
for
testing.
Parameters | |
---|---|
placeListMapTemplate |
PlaceListMapTemplate |
Returns | |
---|---|
PlaceListMapTemplateController |