[android] bumped gestures library version to 0.1.0 (#11483)
This commit is contained in:
@@ -58,7 +58,6 @@ public class GestureDetectorActivity extends AppCompatActivity {
|
||||
private Marker marker;
|
||||
@Nullable
|
||||
private LatLng focalPointLatLng;
|
||||
private boolean animationsEnabled = true;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -198,9 +197,7 @@ public class GestureDetectorActivity extends AppCompatActivity {
|
||||
|
||||
if (focalPointLatLng != null) {
|
||||
gestureAlertsAdapter.addAlert(new GestureAlert(GestureAlert.TYPE_OTHER, "REVERTING MOVE THRESHOLD"));
|
||||
gesturesManager.getMoveGestureDetector().setMoveThreshold(
|
||||
gesturesManager.getMoveGestureDetector().getDefaultMoveThreshold()
|
||||
);
|
||||
gesturesManager.getMoveGestureDetector().setMoveThreshold(0f);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -242,8 +239,7 @@ public class GestureDetectorActivity extends AppCompatActivity {
|
||||
mapboxMap.getUiSettings().setFocalPoint(mapboxMap.getProjection().toScreenLocation(focalPointLatLng));
|
||||
return true;
|
||||
case R.id.menu_gesture_animation:
|
||||
animationsEnabled = !animationsEnabled;
|
||||
mapboxMap.getUiSettings().setAllVelocityAnimationsEnabled(animationsEnabled);
|
||||
mapboxMap.getUiSettings().setAllVelocityAnimationsEnabled(false);
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
@@ -251,10 +247,8 @@ public class GestureDetectorActivity extends AppCompatActivity {
|
||||
private void resetModes() {
|
||||
focalPointLatLng = null;
|
||||
mapboxMap.getUiSettings().setFocalPoint(null);
|
||||
|
||||
gesturesManager.getMoveGestureDetector().setMoveThreshold(
|
||||
gesturesManager.getMoveGestureDetector().getDefaultMoveThreshold()
|
||||
);
|
||||
gesturesManager.getMoveGestureDetector().setMoveThreshold(0f);
|
||||
mapboxMap.getUiSettings().setAllVelocityAnimationsEnabled(true);
|
||||
|
||||
if (marker != null) {
|
||||
mapboxMap.removeMarker(marker);
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
android:title="Focus on a point" />
|
||||
<item
|
||||
android:id="@+id/menu_gesture_animation"
|
||||
android:title="Toggle velocity animations" />
|
||||
android:title="Turn off velocity animations" />
|
||||
</menu>
|
||||
Reference in New Issue
Block a user