[android] Revise handling of tracking modes and interactions

with touch gestures.

This fixes issues #6549 and #6567. Also pertinent to #6557.
Additional code has been added to the test app (Activity "User Tracking
Mode") to test.
A potential race condition in the MapboxMap#easeCamera() methods where
a camera change generated by tracking which could have reset the tracking
modes has been eliminated by factoring out a new method
MapboxMap#easeCameraInternal().
This commit is contained in:
clydebarrow
2016-10-04 18:13:02 +11:00
committed by Tobrun
parent 214ec4e96a
commit a4b0e2f30c
9 changed files with 236 additions and 161 deletions

View File

@@ -4,7 +4,7 @@
<group android:checkableBehavior="all">
<item
android:id="@+id/action_toggle_dismissible_tracking"
android:id="@+id/action_toggle_dismissible_location"
android:checkable="true"
android:checked="false"
android:title="@string/menuitem_title_tracking_mode_dismiss_on_gesture"
@@ -15,6 +15,18 @@
android:checked="false"
android:title="@string/menuitem_title_bearing_mode_dismiss_on_gesture"
app:showAsAction="never" />
<item
android:id="@+id/action_toggle_rotate_gesture_enabled"
android:checkable="true"
android:checked="false"
android:title="@string/menuitem_title_rotate_gesture_enabled"
app:showAsAction="never" />
<item
android:id="@+id/action_toggle_scroll_gesture_enabled"
android:checkable="true"
android:checked="false"
android:title="@string/menuitem_title_scroll_gesture_enabled"
app:showAsAction="never" />
</group>
</menu>

View File

@@ -221,5 +221,7 @@
<string name="action_example">Example action</string>
<string name="action_settings">Settings</string>
<string name="menuitem_title_rotate_gesture_enabled">Enable rotate gestures</string>
<string name="menuitem_title_scroll_gesture_enabled">Enable scroll gestures</string>
</resources>