public class PluginMapComponent extends AbstractMapComponent implements android.content.SharedPreferences.OnSharedPreferenceChangeListener
AbstractMapComponent.OnAllComponentsCreatedCallback
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TAG |
Constructor and Description |
---|
PluginMapComponent() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
addPluginIcon(ToolDescriptor tool)
Store icon, and return predictable icon ID
Stores copy of icon scaled to 32x32
|
static android.graphics.drawable.Drawable |
getPluginIconWithId(java.lang.String id)
Given an identifer, get the icon for the plugin.
|
void |
onCreate(android.content.Context context,
android.content.Intent intent,
MapView mapViewFinal)
Called when the component is first created
|
protected void |
onDestroyImpl(android.content.Context context,
MapView view)
This method is invoked as a subset of the onDestroy call as part of the
MapComponent lifecycle.
|
void |
onSharedPreferenceChanged(android.content.SharedPreferences prefs,
java.lang.String key) |
addOverlay, onConfigurationChanged, onCreateOptionsMenu, onDestroy, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onStart, onStop, registerReceiver, removeOverlay, setOnAllComponentsCreatedCallback, unregisterReceiver
public static final java.lang.String TAG
public void onCreate(android.content.Context context, android.content.Intent intent, MapView mapViewFinal)
MapComponent
onCreate
in interface MapComponent
context
- the context of the component (the MapActivity instance)intent
- the intent of the MapActivitymapViewFinal
- the main MapViewpublic void onSharedPreferenceChanged(android.content.SharedPreferences prefs, java.lang.String key)
onSharedPreferenceChanged
in interface android.content.SharedPreferences.OnSharedPreferenceChangeListener
protected void onDestroyImpl(android.content.Context context, MapView view)
AbstractMapComponent
onDestroyImpl
in class AbstractMapComponent
public static java.lang.String addPluginIcon(ToolDescriptor tool)
tool
- the tool descriptor that contains the icon.public static android.graphics.drawable.Drawable getPluginIconWithId(java.lang.String id)
id
- string identifier