[android] added user dot customization example

Fixes #4896
This commit is contained in:
Cameron Mace
2016-04-28 17:10:44 -04:00
committed by Tobrun
parent 89afbc648e
commit 90cd425c5a
5 changed files with 212 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/primary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
<com.mapbox.mapboxsdk.maps.MapView
android:id="@id/mapView"
android:layout_below="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:style_url="@string/style_mapbox_streets"
app:scroll_enabled="false" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal"
android:weightSum="3">
<Button
android:id="@+id/defaultUserDotColoringButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_user_dot_default" />
<Button
android:id="@+id/tintUserDotButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_user_dot_tint" />
<Button
android:id="@+id/UserAccuracyRingTintButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_user_accuracy_ring_tint" />
</LinearLayout>
</RelativeLayout>

View File

@@ -4,4 +4,5 @@
<color name="primaryDark">#166B83</color>
<color name="accent">#E55E5E</color>
<color name="white">#F9F9F9</color>
<color name="mapbox_green">#56B881</color>
</resources>

View File

@@ -37,6 +37,7 @@
<string name="activity_snapshot">Snapshot Activity</string>
<string name="activity_user_tracking_mode">User tracking mode</string>
<string name="activity_user_tracking_customization">User location customization</string>
<string name="activity_user_dot_color">User location dot color</string>
<string name="activity_user_location_toggle">User location toggle</string>
<string name="activity_custom_layer">Custom Layer</string>
<string name="activity_map_padding">Map Padding</string>
@@ -47,6 +48,7 @@
<!-- Description -->
<string name="description_user_location_tracking">Tracks the location of the user</string>
<string name="description_user_location_customization">Customize the location of the user</string>
<string name="description_user_location_dot_color">Customize the user dot color</string>
<string name="description_user_location_toggle">Toggle location of the user on and off</string>
<string name="description_custom_layer">Overlay a custom native layer on the map</string>
<string name="description_info_window_adapter">Learn how to create a custom InfoWindow</string>
@@ -98,6 +100,9 @@
<string name="button_camera_ease">Ease</string>
<string name="button_camera_animate">Animate</string>
<string name="button_make_snapshot">Snapshot</string>
<string name="button_user_dot_default">Default</string>
<string name="button_user_dot_tint">Tint dot</string>
<string name="button_user_accuracy_ring_tint">Tint ring</string>
<string name="label_fps">FPS:</string>