diff options
author | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-10-03 16:55:57 +0200 |
---|---|---|
committer | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-10-08 13:34:29 +0200 |
commit | f1506d10dac056269ee8bbb81406cf714bd8a1e9 (patch) | |
tree | fb010835543b7c9bc0d554ff91c562fd9515b182 /platform/android | |
parent | 91ea258dde2a715170da2850e327507b77eff6c6 (diff) | |
download | qtlocation-mapboxgl-f1506d10dac056269ee8bbb81406cf714bd8a1e9.tar.gz |
[android] - fix fragments example that were crashing on orientation change
Diffstat (limited to 'platform/android')
2 files changed, 2 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/MapFragmentActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/MapFragmentActivity.java index f5e0371aad..e341a50f9e 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/MapFragmentActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/MapFragmentActivity.java @@ -74,7 +74,7 @@ public class MapFragmentActivity extends AppCompatActivity implements MapFragmen @Override public void onMapChanged(int change) { - if (initialCameraAnimation && change == MapView.DID_FINISH_RENDERING_MAP_FULLY_RENDERED) { + if (initialCameraAnimation && change == MapView.DID_FINISH_RENDERING_MAP_FULLY_RENDERED && mapboxMap != null) { mapboxMap.animateCamera( CameraUpdateFactory.newCameraPosition(new CameraPosition.Builder().tilt(45.0).build()), 5000); initialCameraAnimation = false; diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/SupportMapFragmentActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/SupportMapFragmentActivity.java index f494a9231e..345db5ca20 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/SupportMapFragmentActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/SupportMapFragmentActivity.java @@ -75,7 +75,7 @@ public class SupportMapFragmentActivity extends AppCompatActivity implements Map @Override public void onMapChanged(int change) { - if (initialCameraAnimation && change == MapView.DID_FINISH_RENDERING_MAP_FULLY_RENDERED) { + if (initialCameraAnimation && change == MapView.DID_FINISH_RENDERING_MAP_FULLY_RENDERED && mapboxMap != null) { mapboxMap.animateCamera( CameraUpdateFactory.newCameraPosition(new CameraPosition.Builder().tilt(45.0).build()), 5000); initialCameraAnimation = false; |