summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-09-15 10:52:36 +0300
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-09-22 23:33:56 +0300
commite0312ef208797983b8b143f6d104b644493db4b5 (patch)
tree3d2128144dc8ca70d7e91e827a397a38075f7194 /platform/android
parent5d12503302dff168137d6f3b1444e4dc32ad44dd (diff)
downloadqtlocation-mapboxgl-e0312ef208797983b8b143f6d104b644493db4b5.tar.gz
[android] fix ZoomButtonController initialisation order
- prevents "java.lang.IllegalArgumentException: Receiver not registered: android.widget.ZoomButtonsController" when quitting the map before the receiver is properly registered
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
index 6612110649..271bd155be 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
@@ -125,7 +125,6 @@ public class MapView extends FrameLayout {
myLocationView = (MyLocationView) view.findViewById(R.id.userLocationView);
attrView = (ImageView) view.findViewById(R.id.attributionView);
logoView = (ImageView) view.findViewById(R.id.logoView);
- mapZoomButtonController = new MapZoomButtonController(new ZoomButtonsController(this));
// add accessibility support
setContentDescription(context.getString(R.string.mapbox_mapActionDescription));
@@ -187,6 +186,7 @@ public class MapView extends FrameLayout {
annotationManager, cameraChangeDispatcher);
mapKeyListener = new MapKeyListener(transform, trackingSettings, uiSettings);
+ mapZoomButtonController = new MapZoomButtonController(new ZoomButtonsController(this));
MapZoomControllerListener zoomListener = new MapZoomControllerListener(mapGestureDetector, uiSettings, transform);
mapZoomButtonController.bind(uiSettings, zoomListener);