diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/main/res')
19 files changed, 155 insertions, 12 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_arsenal.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_arsenal.png Binary files differnew file mode 100644 index 0000000000..6fdac4ef09 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_arsenal.png diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_chelsea.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_chelsea.png Binary files differnew file mode 100644 index 0000000000..6cd376b281 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_chelsea.png diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dynamic_marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dynamic_marker.xml new file mode 100644 index 0000000000..e16f6b317d --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_dynamic_marker.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="#FF000000" + android:pathData="M7,7h10v3l4,-4 -4,-4v3H5v6h2V7zm10,10H7v-3l-4,4 4,4v-3h12v-6h-2v4zm-4,-2V9h-1l-2,1v1h1.5v4H13z"/> +</vector> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_map_padding.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_map_padding.xml new file mode 100644 index 0000000000..60b75a5493 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_map_padding.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="#FF000000" + android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"/> +</vector> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml index 5de3651272..21684ccadb 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml @@ -16,6 +16,6 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:style_url="@string/style_mapbox_streets" /> + app:style_url="@string/mapbox_style_mapbox_streets" /> </LinearLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_dynamic_marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_dynamic_marker.xml new file mode 100644 index 0000000000..73592448b2 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_dynamic_marker.xml @@ -0,0 +1,45 @@ +<?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.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" /> + + <FrameLayout + android:id="@+id/content_frame" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_below="@+id/toolbar"> + + <android.support.design.widget.CoordinatorLayout + android:id="@+id/coordinator_layout" + 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.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_animate_coordinates" + app:backgroundTint="@color/white" /> + + </android.support.design.widget.CoordinatorLayout> + + </FrameLayout> + +</RelativeLayout> + + diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow.xml index eccd3ea8eb..f9e0145356 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow.xml @@ -16,7 +16,7 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:style_url="@string/style_mapbox_streets" + app:style_url="@string/mapbox_style_mapbox_streets" app:center_latitude="38.897705003219784" app:center_longitude="-77.03655168667463" app:zoom="15" /> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter.xml index ccced6bbff..8cf30a4475 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter.xml @@ -16,7 +16,7 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:style_url="@string/style_mapbox_streets" + app:style_url="@string/mapbox_style_mapbox_streets" app:center_latitude="47.798202" app:center_longitude="7.573781" app:zoom="4" /> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_concurrent.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_concurrent.xml index 062726fcb2..69276ad491 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_concurrent.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_concurrent.xml @@ -16,7 +16,7 @@ android:id="@+id/infoWindowConcurrentMapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:style_url="@string/style_mapbox_streets" + app:style_url="@string/mapbox_style_mapbox_streets" app:center_latitude="38.897705003219784" app:center_longitude="-77.03655168667463" app:zoom="15" /> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_map_padding.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_map_padding.xml new file mode 100644 index 0000000000..aa3c50d65c --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_map_padding.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + 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" /> + + <View + android:layout_width="@dimen/map_padding_left" + android:layout_height="match_parent" + android:layout_marginTop="?attr/actionBarSize" + android:alpha="0.5" + android:background="@color/mapbox_blue" /> + + <View + android:layout_width="match_parent" + android:layout_height="@dimen/map_padding_bottom" + android:layout_gravity="bottom" + android:layout_marginEnd="@dimen/map_padding_right" + android:layout_marginLeft="@dimen/map_padding_left" + android:layout_marginRight="@dimen/map_padding_right" + android:layout_marginStart="@dimen/map_padding_left" + android:alpha="0.5" + android:background="@color/mapbox_blue" /> + + + <android.support.v7.widget.Toolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:alpha="0.5" + android:background="@color/primary" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" /> + + <View + android:layout_width="@dimen/map_padding_right" + android:layout_height="match_parent" + android:layout_gravity="end" + android:layout_marginLeft="@dimen/map_padding_left" + android:layout_marginStart="@dimen/map_padding_left" + android:alpha="0.5" + android:layout_marginTop="?attr/actionBarSize" + android:background="@color/mapbox_blue" /> + +</FrameLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_mapboxmap.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_mapboxmap.xml index eccd3ea8eb..f9e0145356 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_mapboxmap.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_mapboxmap.xml @@ -16,7 +16,7 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:style_url="@string/style_mapbox_streets" + app:style_url="@string/mapbox_style_mapbox_streets" app:center_latitude="38.897705003219784" app:center_longitude="-77.03655168667463" app:zoom="15" /> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_bulk.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_bulk.xml index ce108ba129..5e9b8e62d7 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_bulk.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_marker_bulk.xml @@ -25,7 +25,7 @@ android:layout_height="match_parent" app:center_latitude="38.897705003219784" app:center_longitude="-77.03655168667463" - app:style_url="@string/style_mapbox_streets" + app:style_url="@string/mapbox_style_mapbox_streets" app:zoom="15" /> </LinearLayout> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_tracking.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_tracking.xml index 699fa4be6b..7b16910953 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_tracking.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_tracking.xml @@ -42,7 +42,7 @@ android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - app:style_url="@string/style_mapbox_streets" + app:style_url="@string/mapbox_style_mapbox_streets" app:zoom="15" /> </LinearLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml index 7875fc2021..7f4012f74e 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml @@ -19,7 +19,7 @@ android:layout_below="@+id/toolbar" app:center_latitude="47.798202" app:center_longitude="7.573781" - app:style_url="@string/style_mapbox_streets" + app:style_url="@string/mapbox_style_mapbox_streets" app:zoom="4" /> <android.support.design.widget.FloatingActionButton diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_double_map.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_double_map.xml index 230a0a308e..88788fc429 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_double_map.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/fragment_double_map.xml @@ -5,10 +5,10 @@ android:layout_height="fill_parent"> <com.mapbox.mapboxsdk.maps.MapView - android:id="@+id/mapview" + android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" - mapbox:access_token="@string/access_token" /> + mapbox:access_token="@string/mapbox_access_token" /> <FrameLayout android:id="@+id/map_card" @@ -22,6 +22,6 @@ android:id="@+id/mini_map" android:layout_width="100dp" android:layout_height="100dp" - mapbox:access_token="@string/access_token" /> + mapbox:access_token="@string/mapbox_access_token" /> </FrameLayout> </RelativeLayout>
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml index b008a4f636..512d195593 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml @@ -192,7 +192,18 @@ android:icon="@drawable/ic_input_24dp" android:title="@string/activity_scroll_by" /> + <item + android:id="@+id/action_dynamic_marker" + android:checkable="false" + android:icon="@drawable/ic_dynamic_marker" + android:title="@string/action_dynamic_marker" /> + + <item + android:id="@+id/action_map_padding" + android:checkable="false" + android:icon="@drawable/ic_map_padding" + android:title="@string/action_map_padding" /> + </menu> </item> - </menu> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_padding.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_padding.xml new file mode 100644 index 0000000000..0db887c4e7 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_padding.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:mapbox="http://schemas.android.com/apk/res-auto"> + <item + android:id="@+id/action_user_tracking" + android:title="My Location Tracking" + mapbox:showAsAction="never" /> + <item + android:id="@+id/action_bangalore" + android:title="Bangalore" + mapbox:showAsAction="never" /> +</menu>
\ 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 87cfebffd6..c852ed0e7a 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml @@ -3,4 +3,8 @@ <dimen name="fab_margin">16dp</dimen> <dimen name="attr_margin">10dp</dimen> <dimen name="coordinatebounds_margin">32dp</dimen> + <dimen name="map_padding_left">96dp</dimen> + <dimen name="map_padding_bottom">256dp</dimen> + <dimen name="map_padding_right">32dp</dimen> + </resources> diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml index 773642f291..ea346674b5 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml @@ -25,6 +25,8 @@ <string name="activity_geocoder">Geocoder Activity</string> <string name="activity_double_map">Double Map Activity</string> <string name="activity_scroll_by">Scroll By Activity</string> + <string name="activity_dynamic_marker">Dynamic Marker Activity</string> + <string name="activity_map_padding">Map Padding Activity</string> <string name="navdrawer_menu_title_mainactivity_controls">Main Activity Controls</string> <string name="navdrawer_menu_title_mainactivity_styles">Main Activity Styles</string> @@ -52,6 +54,8 @@ <string name="action_visible_bounds_explanation">Center map around 2 markers</string> <string name="action_remove_polylines">Remove polylines</string> <string name="action_double_mapview">Double MapView</string> + <string name="action_dynamic_marker">Dynamic Marker</string> + <string name="action_map_padding">Map Padding</string> <string name="button_camera_move">Move</string> <string name="button_camera_ease">Ease</string> |