diff options
author | Brad Leege <bleege@gmail.com> | 2016-06-08 13:07:52 -0500 |
---|---|---|
committer | Ivo van Dongen <info@ivovandongen.nl> | 2016-06-17 19:54:27 +0200 |
commit | 2591147e25d6ed74f091bed97f57fb4591e7bde6 (patch) | |
tree | 373c3373ee2ef15e6a5798093e73f31544c3cb09 /platform/android/MapboxGLAndroidSDKTestApp/src/main/res | |
parent | 11dd4afc5b271c4efb0e900320bdca4d137cd049 (diff) | |
download | qtlocation-mapboxgl-2591147e25d6ed74f091bed97f57fb4591e7bde6.tar.gz |
[android] Setting up LocationPickerActivity infrastructure
Fixes #5282
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/main/res')
7 files changed, 116 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/anim/pulse.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/anim/pulse.xml new file mode 100644 index 0000000000..40bc57ab68 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/anim/pulse.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@android:anim/decelerate_interpolator"> + + <scale + android:duration="1000" + android:fromXScale="1" + android:fromYScale="1" + android:pivotX="50%" + android:pivotY="50%" + android:repeatCount="infinite" + android:repeatMode="restart" + android:toXScale="1.8" + android:toYScale="1.8"/> + + <set android:startOffset="200"> + <alpha + android:duration="800" + android:fromAlpha="1.0" + android:repeatCount="infinite" + android:repeatMode="restart" + android:toAlpha="0.0"/> + </set> +</set>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_circle.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_circle.xml new file mode 100644 index 0000000000..006b2ce5a8 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_circle.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape + xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="oval"> + + <solid + android:color="@color/mapbox_blue"/> + + <size + android:width="@dimen/circle_size" + android:height="@dimen/circle_size"/> +</shape>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_clear_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_clear_24dp.xml new file mode 100644 index 0000000000..1e2d044bee --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_clear_24dp.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="#FFFFFF" + android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/> +</vector> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_picker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_picker.xml new file mode 100644 index 0000000000..f9fe77bfec --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_picker.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <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_width="match_parent" + android:layout_height="match_parent" + android:layout_below="@id/toolbar"/> + + <ImageButton + android:id="@+id/clearDisplayViewButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_clear_24dp" + android:background="@color/accent" + android:visibility="gone" + android:layout_marginLeft="@dimen/full_button_margin" + android:layout_above="@+id/selectLocationButton" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true"/> + + <Button + android:id="@+id/selectLocationButton" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_margin="@dimen/full_button_margin" + android:background="@color/primary" + android:text="@string/navigation_select_location_button_text" + android:textColor="@android:color/white" + android:layout_alignParentBottom="true"/> + +</RelativeLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/view_pulse_marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/view_pulse_marker.xml new file mode 100644 index 0000000000..e1ac50b440 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/view_pulse_marker.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="48dp" + android:layout_height="48dp"> + + <ImageView + android:id="@+id/foreground_imageView" + android:layout_width="@dimen/circle_size" + android:layout_height="@dimen/circle_size" + android:layout_gravity="center" + android:src="@drawable/ic_circle"/> + + <ImageView + android:id="@+id/background_imageview" + android:layout_width="@dimen/circle_size" + android:layout_height="@dimen/circle_size" + android:layout_gravity="center" + android:alpha="0.5" + android:src="@drawable/ic_circle"/> + +</FrameLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml index 98ec90c6fd..c9bc0b85cf 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <dimen name="circle_size">24dp</dimen> <dimen name="fab_margin">16dp</dimen> + <dimen name="full_button_margin">8dp</dimen> <dimen name="attr_margin">10dp</dimen> <dimen name="coordinatebounds_margin">32dp</dimen> <dimen name="map_padding_left">96dp</dimen> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml index 2ec1b0d25d..fba86a7213 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml @@ -35,6 +35,9 @@ <string name="activity_directions">Directions</string> <string name="activity_geocoder">Geocoder</string> + <!-- Navigation --> + <string name="activity_location_picker">Location Picker</string> + <!-- Other --> <string name="activity_double_map">Double Map Activity</string> <string name="activity_back_to_map">Back to map activity</string> @@ -82,7 +85,7 @@ <string name="description_back_to_map">Restart map view after temporarily leaving to another activity</string> <string name="description_view_marker">Use an Android SDK View as marker</string> <string name="description_dynamic_info_window_adapter">Learn how to create a dynamic custom InfoWindow</string> - + <string name="description_location_picker">Use a fixed Marker to select your location</string> <string name="menuitem_title_concurrent_infowindow">Concurrent Open InfoWindows</string> <string name="menuitem_title_deselect_markers_on_tap">Deselect Markers On Tap</string> <string name="menuitem_title_tracking_mode_dismiss_on_gesture">Dismiss location tracking on gesture</string> @@ -101,6 +104,7 @@ <string name="category_maplayout">Map Layout</string> <string name="category_offline">Offline</string> <string name="category_userlocation">User Location</string> + <string name="category_navigation">Navigation</string> <string name="action_visible_bounds_explanation">Center map around 2 markers</string> <string name="action_remove_polylines">Remove polylines</string> @@ -162,4 +166,6 @@ <string name="dynamic_marker_arsenal_title">Arsenal</string> <string name="dynamic_marker_arsenal_snippet">Emirates Stadium</string> + <string name="navigation_select_location_button_text">Select Location!</string> + </resources> |