summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java81
1 files changed, 6 insertions, 75 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java
index a7448cd087..f370b7e4ed 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java
@@ -45,21 +45,16 @@ public final class UiSettings {
private float pixelRatio;
private boolean rotateGesturesEnabled = true;
- private boolean rotateGestureChangeAllowed = true;
private boolean tiltGesturesEnabled = true;
- private boolean tiltGestureChangeAllowed = true;
private boolean zoomGesturesEnabled = true;
- private boolean zoomGestureChangeAllowed = true;
private boolean scrollGesturesEnabled = true;
- private boolean scrollGestureChangeAllowed = true;
private boolean zoomControlsEnabled;
private boolean doubleTapGesturesEnabled = true;
- private boolean doubleTapGestureChangeAllowed = true;
private boolean scaleVelocityAnimationEnabled = true;
private boolean rotateVelocityAnimationEnabled = true;
@@ -112,42 +107,27 @@ public final class UiSettings {
private void initialiseGestures(MapboxMapOptions options) {
setZoomGesturesEnabled(options.getZoomGesturesEnabled());
- setZoomGestureChangeAllowed(options.getZoomGesturesEnabled());
setScrollGesturesEnabled(options.getScrollGesturesEnabled());
- setScrollGestureChangeAllowed(options.getScrollGesturesEnabled());
setRotateGesturesEnabled(options.getRotateGesturesEnabled());
- setRotateGestureChangeAllowed(options.getRotateGesturesEnabled());
setTiltGesturesEnabled(options.getTiltGesturesEnabled());
- setTiltGestureChangeAllowed(options.getTiltGesturesEnabled());
setZoomControlsEnabled(options.getZoomControlsEnabled());
setDoubleTapGesturesEnabled(options.getDoubleTapGesturesEnabled());
- setDoubleTapGestureChangeAllowed(options.getDoubleTapGesturesEnabled());
}
private void saveGestures(Bundle outState) {
outState.putBoolean(MapboxConstants.STATE_ZOOM_ENABLED, isZoomGesturesEnabled());
- outState.putBoolean(MapboxConstants.STATE_ZOOM_ENABLED_CHANGE, isZoomGestureChangeAllowed());
outState.putBoolean(MapboxConstants.STATE_SCROLL_ENABLED, isScrollGesturesEnabled());
- outState.putBoolean(MapboxConstants.STATE_SCROLL_ENABLED_CHANGE, isScrollGestureChangeAllowed());
outState.putBoolean(MapboxConstants.STATE_ROTATE_ENABLED, isRotateGesturesEnabled());
- outState.putBoolean(MapboxConstants.STATE_ROTATE_ENABLED_CHANGE, isRotateGestureChangeAllowed());
outState.putBoolean(MapboxConstants.STATE_TILT_ENABLED, isTiltGesturesEnabled());
- outState.putBoolean(MapboxConstants.STATE_TILT_ENABLED_CHANGE, isTiltGestureChangeAllowed());
outState.putBoolean(MapboxConstants.STATE_DOUBLE_TAP_ENABLED, isDoubleTapGesturesEnabled());
- outState.putBoolean(MapboxConstants.STATE_DOUBLE_TAP_ENABLED_CHANGE, isDoubleTapGestureChangeAllowed());
}
private void restoreGestures(Bundle savedInstanceState) {
setZoomGesturesEnabled(savedInstanceState.getBoolean(MapboxConstants.STATE_ZOOM_ENABLED));
- setZoomGestureChangeAllowed(savedInstanceState.getBoolean(MapboxConstants.STATE_ZOOM_ENABLED_CHANGE));
setScrollGesturesEnabled(savedInstanceState.getBoolean(MapboxConstants.STATE_SCROLL_ENABLED));
- setScrollGestureChangeAllowed(savedInstanceState.getBoolean(MapboxConstants.STATE_SCROLL_ENABLED_CHANGE));
setRotateGesturesEnabled(savedInstanceState.getBoolean(MapboxConstants.STATE_ROTATE_ENABLED));
- setRotateGestureChangeAllowed(savedInstanceState.getBoolean(MapboxConstants.STATE_ROTATE_ENABLED_CHANGE));
setTiltGesturesEnabled(savedInstanceState.getBoolean(MapboxConstants.STATE_TILT_ENABLED));
- setTiltGestureChangeAllowed(savedInstanceState.getBoolean(MapboxConstants.STATE_TILT_ENABLED_CHANGE));
setDoubleTapGesturesEnabled(savedInstanceState.getBoolean(MapboxConstants.STATE_DOUBLE_TAP_ENABLED));
- setDoubleTapGestureChangeAllowed(savedInstanceState.getBoolean(MapboxConstants.STATE_DOUBLE_TAP_ENABLED_CHANGE));
}
private void initialiseCompass(MapboxMapOptions options, Resources resources) {
@@ -662,9 +642,7 @@ public final class UiSettings {
* @param rotateGesturesEnabled If true, rotating is enabled.
*/
public void setRotateGesturesEnabled(boolean rotateGesturesEnabled) {
- if (rotateGestureChangeAllowed) {
- this.rotateGesturesEnabled = rotateGesturesEnabled;
- }
+ this.rotateGesturesEnabled = rotateGesturesEnabled;
}
/**
@@ -676,14 +654,6 @@ public final class UiSettings {
return rotateGesturesEnabled;
}
- void setRotateGestureChangeAllowed(boolean rotateGestureChangeAllowed) {
- this.rotateGestureChangeAllowed = rotateGestureChangeAllowed;
- }
-
- boolean isRotateGestureChangeAllowed() {
- return rotateGestureChangeAllowed;
- }
-
/**
* <p>
* Changes whether the user may tilt the map.
@@ -697,9 +667,8 @@ public final class UiSettings {
* @param tiltGesturesEnabled If true, tilting is enabled.
*/
public void setTiltGesturesEnabled(boolean tiltGesturesEnabled) {
- if (tiltGestureChangeAllowed) {
- this.tiltGesturesEnabled = tiltGesturesEnabled;
- }
+ this.tiltGesturesEnabled = tiltGesturesEnabled;
+
}
/**
@@ -711,14 +680,6 @@ public final class UiSettings {
return tiltGesturesEnabled;
}
- void setTiltGestureChangeAllowed(boolean tiltGestureChangeAllowed) {
- this.tiltGestureChangeAllowed = tiltGestureChangeAllowed;
- }
-
- boolean isTiltGestureChangeAllowed() {
- return tiltGestureChangeAllowed;
- }
-
/**
* <p>
* Changes whether the user may zoom the map.
@@ -732,9 +693,7 @@ public final class UiSettings {
* @param zoomGesturesEnabled If true, zooming is enabled.
*/
public void setZoomGesturesEnabled(boolean zoomGesturesEnabled) {
- if (zoomGestureChangeAllowed) {
- this.zoomGesturesEnabled = zoomGesturesEnabled;
- }
+ this.zoomGesturesEnabled = zoomGesturesEnabled;
}
/**
@@ -746,14 +705,6 @@ public final class UiSettings {
return zoomGesturesEnabled;
}
- void setZoomGestureChangeAllowed(boolean zoomGestureChangeAllowed) {
- this.zoomGestureChangeAllowed = zoomGestureChangeAllowed;
- }
-
- boolean isZoomGestureChangeAllowed() {
- return zoomGestureChangeAllowed;
- }
-
/**
* <p>
* Sets whether the zoom controls are enabled.
@@ -792,9 +743,7 @@ public final class UiSettings {
* @param doubleTapGesturesEnabled If true, zooming with a double tap is enabled.
*/
public void setDoubleTapGesturesEnabled(boolean doubleTapGesturesEnabled) {
- if (doubleTapGestureChangeAllowed) {
- this.doubleTapGesturesEnabled = doubleTapGesturesEnabled;
- }
+ this.doubleTapGesturesEnabled = doubleTapGesturesEnabled;
}
/**
@@ -806,14 +755,6 @@ public final class UiSettings {
return doubleTapGesturesEnabled;
}
- void setDoubleTapGestureChangeAllowed(boolean doubleTapGestureChangeAllowed) {
- this.doubleTapGestureChangeAllowed = doubleTapGestureChangeAllowed;
- }
-
- boolean isDoubleTapGestureChangeAllowed() {
- return doubleTapGestureChangeAllowed;
- }
-
private void restoreDeselectMarkersOnTap(Bundle savedInstanceState) {
setDeselectMarkersOnTap(savedInstanceState.getBoolean(MapboxConstants.STATE_DESELECT_MARKER_ON_TAP));
}
@@ -855,9 +796,7 @@ public final class UiSettings {
* @param scrollGesturesEnabled If true, scrolling is enabled.
*/
public void setScrollGesturesEnabled(boolean scrollGesturesEnabled) {
- if (scrollGestureChangeAllowed) {
- this.scrollGesturesEnabled = scrollGesturesEnabled;
- }
+ this.scrollGesturesEnabled = scrollGesturesEnabled;
}
/**
@@ -869,14 +808,6 @@ public final class UiSettings {
return scrollGesturesEnabled;
}
- void setScrollGestureChangeAllowed(boolean scrollGestureChangeAllowed) {
- this.scrollGestureChangeAllowed = scrollGestureChangeAllowed;
- }
-
- boolean isScrollGestureChangeAllowed() {
- return scrollGestureChangeAllowed;
- }
-
/**
* Returns whether scale velocity animation should execute after users finishes a gesture.
*