// The Android rotate screen mess.
this.mMapActivityOnMapReadyCallback.onDestroy();
+ this.mButtonsUpdate.onDestroy();
}
public void onClickSaveLocation(final View v) {
this.mapActivity.mMap.animateCamera(CameraUpdateFactory.zoomIn());
this.mapActivity.mMap.animateCamera(CameraUpdateFactory.zoomTo(8), 2000, null);
}
-
- private WeatherLocation getLocation() {
- return this.weatherLocation;
- }
}
private class ButtonsUpdate {
}
private void doUpdate() {
+ if (this.mapActivity == null) {
+ // Do nothing
+ return;
+ }
+
if (this.mapActivity.mMap == null) {
final Button getLocationButton = (Button) this.mapActivity.findViewById(R.id.weather_map_button_getlocation);
final Button saveLocationButton = (Button) this.mapActivity.findViewById(R.id.weather_map_button_savelocation);
}
}
}
+
+ private void onDestroy() {
+ this.mapActivity = null;
+ }
}
}