forward MapActivity stop/resume to MapView
This commit is contained in:
parent
d42302a150
commit
a849b30efe
@ -51,6 +51,7 @@ public abstract class MapActivity extends FragmentActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected Map mMap;
|
protected Map mMap;
|
||||||
|
protected MapView mMapView;
|
||||||
|
|
||||||
public Map map() {
|
public Map map() {
|
||||||
return mMap;
|
return mMap;
|
||||||
@ -86,21 +87,24 @@ public abstract class MapActivity extends FragmentActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
mMapView.onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
|
mMapView.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called once by each MapView during its setup process.
|
* This method is called once by each MapView during its setup process.
|
||||||
*
|
*
|
||||||
* @param map
|
* @param mapView
|
||||||
* the calling MapView.
|
* the calling MapView.
|
||||||
*/
|
*/
|
||||||
public final void registerMapView(MapView map) {
|
public final void registerMapView(MapView mapView) {
|
||||||
mMap = map.map();
|
mMapView = mapView;
|
||||||
|
mMap = mapView.map();
|
||||||
|
|
||||||
SharedPreferences sharedPreferences = getSharedPreferences(PREFERENCES_FILE,
|
SharedPreferences sharedPreferences = getSharedPreferences(PREFERENCES_FILE,
|
||||||
MODE_PRIVATE);
|
MODE_PRIVATE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user