public class MapMenuReceiver
extends android.content.BroadcastReceiver
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HIDE_MENU |
static java.lang.String |
REGISTER_MENU |
static java.lang.String |
SHOW_MENU |
static java.lang.String |
TAG |
static java.lang.String |
UNREGISTER_MENU |
Constructor and Description |
---|
MapMenuReceiver(MapView mapView,
MenuLayoutWidget menuLayout,
MenuMapAdapter adapter) |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(MapMenuEventListener listener)
Add a listener to
MapMenuWidget
lifecycle events. |
static MapItem |
getCurrentItem()
Find the map item that the radial is currently opened on
|
static MapMenuReceiver |
getInstance() |
static MenuLayoutWidget |
getMenuWidget()
Gets root level
MenuLayoutWidget . |
void |
hideMenu() |
java.lang.String |
lookupMenu(MapItem mi)
Allows for an application to lookup what type of menu might be provided for a specific
map menu type.
|
java.lang.String |
lookupMenu(java.lang.String type)
Allows for an application to lookup what type of menu might be provided for a specific
map menu type.
|
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
boolean |
registerMapMenuFactory(MapMenuFactory factory)
Add an additional map menu factory that creates radial menus.
|
void |
registerMenu(java.lang.String type,
java.lang.String menu)
Allows for an application to register a globally used menu for a specific Map Item type.
|
void |
removeEventListener(MapMenuEventListener listener)
Remove menu event listener from receiving lifecycle events.
|
boolean |
unregisterMapMenuFactory(MapMenuFactory factory)
Removes an added map menu factory.
|
void |
unregisterMenu(java.lang.String type)
Allows for an application to unregister a globally used menu for a specific Map Item type.
|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public static final java.lang.String TAG
public static final java.lang.String SHOW_MENU
public static final java.lang.String HIDE_MENU
public static final java.lang.String REGISTER_MENU
public static final java.lang.String UNREGISTER_MENU
public MapMenuReceiver(MapView mapView, MenuLayoutWidget menuLayout, MenuMapAdapter adapter)
public static MapMenuReceiver getInstance()
public void onReceive(android.content.Context context, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver
public java.lang.String lookupMenu(java.lang.String type)
type
- the string of the type to matchpublic java.lang.String lookupMenu(MapItem mi)
mi
- the map item to matchpublic void registerMenu(java.lang.String type, java.lang.String menu)
type
- the string of the type to matchmenu
- the stringified menupublic void unregisterMenu(java.lang.String type)
type
- the string of the type to matchpublic void hideMenu()
public void addEventListener(MapMenuEventListener listener)
MapMenuWidget
lifecycle events. Listeners are visited prior to menu display.
Listeners should return true when the menu should not be created.listener
- receives fully formed menus after creation prior to displaypublic void removeEventListener(MapMenuEventListener listener)
listener
- public static MenuLayoutWidget getMenuWidget()
MenuLayoutWidget
.
This layout widget is the parent of all displayed radial menus.public static MapItem getCurrentItem()
public boolean registerMapMenuFactory(MapMenuFactory factory)
MapMenuWidget
in response to a MapItem
. Factories
should return a "default" menu when the provided item is null.factory
- creator of fully populated MapItemWidgetspublic boolean unregisterMapMenuFactory(MapMenuFactory factory)
factory
- instance to be removed from list of factories