diff options
author | Wilhelm Berg <wb@BergWerk-GIS.at> | 2018-09-12 15:07:57 +0200 |
---|---|---|
committer | Wilhelm Berg <wb@BergWerk-GIS.at> | 2018-09-12 15:07:57 +0200 |
commit | 98b34cb0dbf5c50d7f319724c93021418140b15f (patch) | |
tree | 11cd51f86b5c672dda6bfe087f40f77df1553971 /platform/android/MapboxGLAndroidSDKTestApp/src/main/res | |
parent | ee17d79f9420eb859303d977955454dacc470db6 (diff) | |
parent | 079ba0209ed383c15123902f0810e658c2b0abf4 (diff) | |
download | qtlocation-mapboxgl-98b34cb0dbf5c50d7f319724c93021418140b15f.tar.gz |
Merge remote-tracking branch 'origin' into bwg-vs2017upstream/bwg-vs2017
# Conflicts:
# cmake/mason-dependencies.cmake
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/main/res')
14 files changed, 293 insertions, 7 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/custom_user_arrow.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/custom_user_arrow.xml new file mode 100644 index 0000000000..65c3b4aae3 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/custom_user_arrow.xml @@ -0,0 +1,11 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="36dp" + android:height="36dp" + android:viewportHeight="36.0" + android:viewportWidth="36.0"> + <path + android:fillColor="#FF82C6" + android:pathData="M18,0L23,7L13,7L18,0ZM22.8,7C21.33,6.36 19.71,6 18,6C16.29,6 14.67,6.36 13.2,7L22.8,7Z" + android:strokeColor="#00000000" + android:strokeWidth="1"/> +</vector> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/custom_user_icon.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/custom_user_icon.xml new file mode 100644 index 0000000000..37f1d4de09 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/custom_user_icon.xml @@ -0,0 +1,10 @@ +<vector + xmlns:android="http://schemas.android.com/apk/res/android" + android:width="14dp" + android:height="14dp" + android:viewportHeight="14.0" + android:viewportWidth="14.0"> + <path + android:fillColor="#fff" + android:pathData="M7,7m-7,0a7,7 0,1 1,14 0a7,7 0,1 1,-14 0"/> +</vector> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/custom_user_puck_icon.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/custom_user_puck_icon.xml new file mode 100644 index 0000000000..31d93f1ed4 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/custom_user_puck_icon.xml @@ -0,0 +1,23 @@ +<vector + xmlns:android="http://schemas.android.com/apk/res/android" + android:width="75dp" + android:height="75dp" + android:viewportHeight="75.0" + android:viewportWidth="75.0"> + <path + android:fillAlpha="0.16" + android:fillColor="#FF3D57" + android:pathData="M37.5,37.5m-37.5,0a37.5,37.5 0,1 1,75 0a37.5,37.5 0,1 1,-75 0" + android:strokeColor="#00000000" + android:strokeWidth="1"/> + <path + android:fillColor="#000000" + android:pathData="M37.5,37.5m-28.5,0a28.5,28.5 0,1 1,57 0a28.5,28.5 0,1 1,-57 0" + android:strokeColor="#00000000" + android:strokeWidth="1"/> + <path + android:fillColor="#FF82C6" + android:pathData="M39.2,28.46C39.01,27.99 38.54,27.68 38.02,27.69C37.5,27.7 37.02,28.01 36.81,28.49L27.05,45.83C26.83,46.32 26.92,46.89 27.28,47.26C27.65,47.64 28.21,47.75 28.71,47.54L37.07,44.03C37.39,43.89 37.75,43.89 38.06,44.02L46.27,47.34C46.75,47.54 47.33,47.42 47.71,47.03C48.09,46.64 48.21,46.07 48,45.59L39.2,28.46Z" + android:strokeColor="#00000000" + android:strokeWidth="1"/> +</vector> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_disabled.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_disabled.xml new file mode 100644 index 0000000000..16f058f322 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_disabled.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94L13,1h-2v2.06c-1.13,0.12 -2.19,0.46 -3.16,0.97l1.5,1.5C10.16,5.19 11.06,5 12,5c3.87,0 7,3.13 7,7 0,0.94 -0.19,1.84 -0.52,2.65l1.5,1.5c0.5,-0.96 0.84,-2.02 0.97,-3.15L23,13v-2h-2.06zM3,4.27l2.04,2.04C3.97,7.62 3.25,9.23 3.06,11L1,11v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94L11,23h2v-2.06c1.77,-0.2 3.38,-0.91 4.69,-1.98L19.73,21 21,19.73 4.27,3 3,4.27zM16.27,17.54C15.09,18.45 13.61,19 12,19c-3.87,0 -7,-3.13 -7,-7 0,-1.61 0.55,-3.09 1.46,-4.27l9.81,9.81z"/> +</vector> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_layer_fragment.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_layer_fragment.xml new file mode 100644 index 0000000000..3c1436a1a8 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_layer_fragment.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.constraint.ConstraintLayout 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"> + + <FrameLayout + android:id="@+id/container" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + + <android.support.design.widget.FloatingActionButton + android:id="@+id/fab" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="bottom|end" + android:layout_margin="@dimen/fab_margin" + android:tint="@android:color/white" + app:backgroundTint="@color/accent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:srcCompat="@drawable/ic_layers" /> + +</android.support.constraint.ConstraintLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_layer_map_change.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_layer_map_change.xml new file mode 100644 index 0000000000..54171a073d --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_layer_map_change.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.design.widget.CoordinatorLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/coordinator_layout" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <com.mapbox.mapboxsdk.maps.MapView + android:id="@+id/mapView" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginBottom="0dp" + app:mapbox_uiAttribution="false"/> + + <android.support.design.widget.FloatingActionButton + android:id="@+id/fabStyles" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end|bottom" + android:layout_marginBottom="16dp" + android:layout_marginEnd="16dp" + android:layout_marginRight="16dp" + android:src="@drawable/ic_layers" + android:tint="@android:color/white" + app:backgroundTint="@color/accent" + app:layout_anchorGravity="top"/> + +</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_layer_mode.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_layer_mode.xml new file mode 100644 index 0000000000..e23d876e3a --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_layer_mode.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <com.mapbox.mapboxsdk.maps.MapView + android:id="@+id/mapView" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginBottom="0dp" + app:layout_constraintBottom_toTopOf="@+id/linearLayout" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:mapbox_uiAttribution="false" /> + + <LinearLayout + android:id="@+id/linearLayout" + style="?android:attr/buttonBarStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:background="@color/primary" + android:orientation="horizontal" + android:weightSum="4" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + tools:layout_constraintBottom_creator="1" + tools:layout_constraintLeft_creator="1" + tools:layout_constraintRight_creator="1"> + + <TextView + android:id="@+id/tv_mode" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight=".75" + android:gravity="center" + android:text="Mode:" + android:textColor="@color/white" + android:textSize="18sp" + android:textStyle="bold" /> + + <Button + android:id="@+id/button_location_mode" + style="?android:attr/buttonBarButtonStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1.25" + android:gravity="center" + android:text="Normal" + android:textColor="@android:color/white" /> + + <TextView + android:id="@+id/tv_tracking" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight=".85" + android:gravity="center" + android:text="Tracking:" + android:textColor="@color/white" + android:textSize="18sp" + android:textStyle="bold" /> + + <Button + android:id="@+id/button_location_tracking" + style="?android:attr/buttonBarButtonStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1.15" + android:gravity="center" + android:text="None" + android:textColor="@android:color/white" /> + + </LinearLayout> + +</android.support.constraint.ConstraintLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_manual_update.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_manual_update.xml new file mode 100644 index 0000000000..3aac74a1e2 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_manual_update.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/coordinator_layout" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <com.mapbox.mapboxsdk.maps.MapView + android:id="@+id/mapView" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginBottom="0dp" + app:mapbox_uiAttribution="false" /> + + <android.support.design.widget.FloatingActionButton + android:id="@+id/fabToggleManualLocation" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end|bottom" + android:layout_marginBottom="82dp" + android:layout_marginEnd="16dp" + android:layout_marginRight="16dp" + android:tint="@android:color/white" + app:backgroundTint="@color/accent" + app:layout_anchorGravity="top" + app:srcCompat="@drawable/ic_layers" /> + + <android.support.design.widget.FloatingActionButton + android:id="@+id/fabManualLocationChange" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end|bottom" + android:layout_marginBottom="16dp" + android:layout_marginEnd="16dp" + android:layout_marginRight="16dp" + android:alpha="0.5" + android:tint="@android:color/white" + app:backgroundTint="@color/accent" + app:layout_anchorGravity="top" + app:srcCompat="@drawable/ic_my_location" /> + +</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_query_source_features.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_query_source_features.xml index 1c439a5ecc..27c77cf004 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_query_source_features.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_query_source_features.xml @@ -1,16 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout - xmlns:android="http://schemas.android.com/apk/res/android" +<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/coordinator_layout" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:orientation="vertical"> <com.mapbox.mapboxsdk.maps.MapView android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:mapbox_cameraTargetLat="0" - app:mapbox_cameraTargetLng="0" - app:mapbox_cameraZoom="16"/> + app:mapbox_cameraTargetLat="51" + app:mapbox_cameraTargetLng="17.25" + app:mapbox_cameraZoom="8" /> -</RelativeLayout> + <android.support.design.widget.FloatingActionButton + android:id="@+id/fab" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end|bottom" + android:layout_margin="@dimen/fab_margin" + android:src="@drawable/ic_layers" + app:backgroundTint="@android:color/white" /> + +</android.support.design.widget.CoordinatorLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_location_mode.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_location_mode.xml new file mode 100644 index 0000000000..302ab33bc2 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_location_mode.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + <item android:id="@+id/action_style_change" + android:title="Toggle custom LocationLayer style" + app:showAsAction="never"/> + + <item android:id="@+id/action_map_style_change" + android:title="Toggle custom Map style" + app:showAsAction="never"/> + + <item android:id="@+id/action_component_disable" + android:title="Disable Component" + app:showAsAction="never"/> + + <item android:id="@+id/action_component_enabled" + android:title="Enable Component" + app:showAsAction="never"/> + + <item android:id="@+id/action_gestures_management_enabled" + android:title="Enable Gestures Management" + app:showAsAction="never"/> + + <item android:id="@+id/action_gestures_management_disabled" + android:title="Disable Gestures Management" + app:showAsAction="never"/> +</menu>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/categories.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/categories.xml index aafeb1cd9c..a4403a34f7 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/categories.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/categories.xml @@ -14,4 +14,5 @@ <string name="category_features">Features</string> <string name="category_storage">Storage</string> <string name="category_textureview">Texture View</string> + <string name="category_location">Location</string> </resources>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml index 6c68edc4d2..cb9c2043dc 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml @@ -71,4 +71,8 @@ <string name="description_heatmaplayer">Use HeatmapLayer to visualise earthquakes</string> <string name="description_gesture_detector">Manipulate gestures detector\'s settings</string> <string name="description_draggable_marker">Click to add a marker, long-click to drag</string> + <string name="description_location_map_change">Change map\'s style while location is displayed</string> + <string name="description_location_modes">Showcases location render and tracking modes</string> + <string name="description_location_fragment">Uses LocationComponent in a Fragment</string> + <string name="description_location_manual">Force location updates and don\'t rely on the engine</string> </resources> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/styles.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/styles.xml index 777d8a5f56..a0525171a5 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/styles.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/styles.xml @@ -38,4 +38,16 @@ <style name="AppTheme" parent="AppBaseTheme" /> + <style name="CustomLocationComponent" parent="mapbox_LocationComponent"> + <item name="mapbox_foregroundDrawable">@drawable/custom_user_icon</item> + + <item name="mapbox_bearingDrawable">@drawable/custom_user_arrow</item> + <item name="mapbox_gpsDrawable">@drawable/custom_user_puck_icon</item> + + <item name="mapbox_accuracyAlpha">0.15</item> + <item name="mapbox_accuracyColor">#FF82C6</item> + + <item name="mapbox_elevation">0dp</item> + </style> + </resources> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/titles.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/titles.xml index ddf3518863..f094a67b39 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/titles.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/titles.xml @@ -71,4 +71,8 @@ <string name="activity_heatmaplayer">Heatmap layer</string> <string name="activity_gesture_detector">Gestures detector</string> <string name="activity_draggable_maker">Draggable marker</string> + <string name="activity_location_map_change">Simple Location Activity</string> + <string name="activity_location_modes">Location Modes Activity</string> + <string name="activity_location_fragment">Location Fragment</string> + <string name="activity_location_manual">Manual Location updates</string> </resources>
\ No newline at end of file |