public final class MapItemList
extends java.lang.Object
setItems(Collection)
with a non-empty list
and then show()
to display the list in a drop-down.Modifier and Type | Class and Description |
---|---|
static interface |
MapItemList.OnCancel
Callback for when cancel has been selected
|
static interface |
MapItemList.OnItemSelected
Callback for when a single map item can be selected
|
static interface |
MapItemList.OnItemsSelected
Callback for when multiple map items can be selected
|
Constructor and Description |
---|
MapItemList(MapView mapView)
Create a new map item list
|
MapItemList(MapView mapView,
android.content.Context plugin)
Create a new map item list
|
Modifier and Type | Method and Description |
---|---|
MapItemList |
setButtonText(int textId)
Set the text displayed in the confirm button in the top-right
|
MapItemList |
setButtonText(java.lang.String text)
Set the text displayed in the confirm button in the top-right
|
MapItemList |
setItems(java.util.Collection<? extends MapItem> items)
Set the map items displayed in this list
|
MapItemList |
setOnCancel(MapItemList.OnCancel onCancel)
Set callback invoked when a user cancels out of the list
|
MapItemList |
setOnItemSelected(MapItemList.OnItemSelected onSelect)
Set callback invoked when an item has been selected
This will automatically configure the list for single-select mode
|
MapItemList |
setOnItemsSelected(MapItemList.OnItemsSelected onSelect)
Set callback invoked when a selection of multiple items has been confirmed
This will automatically configure the list for multi-select mode
|
MapItemList |
setTitle(int titleId)
Set the title to display at the top of the list
|
MapItemList |
setTitle(java.lang.String title)
Set the title to display at the top of the list
|
boolean |
show()
Show this map item list in a drop-down
|
public MapItemList(MapView mapView, android.content.Context plugin)
mapView
- Map view instanceplugin
- Plugin context used for resource lookupspublic MapItemList(MapView mapView)
mapView
- Map view instancepublic MapItemList setItems(java.util.Collection<? extends MapItem> items)
items
- List of items to displaypublic MapItemList setOnItemSelected(MapItemList.OnItemSelected onSelect)
onSelect
- Callbackpublic MapItemList setOnItemsSelected(MapItemList.OnItemsSelected onSelect)
onSelect
- Callbackpublic MapItemList setOnCancel(MapItemList.OnCancel onCancel)
onCancel
- Callbackpublic MapItemList setTitle(java.lang.String title)
title
- Titlepublic MapItemList setTitle(int titleId)
titleId
- String resource ID (plugin context)public MapItemList setButtonText(java.lang.String text)
text
- Button textpublic MapItemList setButtonText(int textId)
textId
- String resource ID (plugin context)public boolean show()