summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java116
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AddRemoveMarkerActivity.java16
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedMarkerActivity.java60
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java22
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/DynamicMarkerChangeActivity.java15
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewActivity.java4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/customlayer/CustomLayerActivity.java4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java18
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowAdapterActivity.java13
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/NavigationDrawerActivity.java4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CustomSpriteActivity.java2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationDrawableActivity.java4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationToggleActivity.java4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineDownloadRegionDialog.java2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineListRegionsDialog.java2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/IconUtils.java31
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/anim/pulse.xml24
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/animator/rotate_360.xml8
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_android.pngbin0 -> 1711 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_android_2.pngbin0 -> 1562 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_drawer.pngbin2829 -> 0 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_android.pngbin0 -> 1217 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_android_2.pngbin0 -> 1117 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_drawer.pngbin2820 -> 0 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_android.pngbin0 -> 2202 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_android_2.pngbin0 -> 2142 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_drawer.pngbin2836 -> 0 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_android.pngbin0 -> 3639 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_android_2.pngbin0 -> 3495 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_arsenal.pngbin1178 -> 0 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_chelsea.pngbin1692 -> 0 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_drawer.pngbin202 -> 0 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_android.pngbin0 -> 4936 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_android_2.pngbin0 -> 4883 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_taxi_top_small.pngbin10087 -> 0 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add_a_photo_black.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add_a_photo_black_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_airplanemode_active_black.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_airplanemode_active_black_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_clear_24dp.xml9
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_delete.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_delete_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_bus_black.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_bus_black_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_car_black.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_car_black_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_run_black.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_run_black_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_droppin.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_droppin_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_input.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_input_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers_clear.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers_clear_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_city.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_city_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_disabled.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_disabled_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_my_location.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_my_location_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_print.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_print_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_refresh.xml (renamed from platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_refresh_24dp.xml)0
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_stars.xml9
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/marker.xml4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_add_sprite.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circle_layer.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circlelayer.xml29
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_custom_layer.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_debug_mode.xml4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml21
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_geocoder.xml31
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter_dynamic.xml24
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_source.xml36
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_toggle.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_print.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_scroll_by.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_snapshot.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_style_file.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_surfaceview_mediacontrols.xml31
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_video_view.xml37
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/view_pulse_marker.xml21
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_main.xml3
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_polyline.xml2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/sea_waves.mp4bin5166670 -> 0 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values-v21/dimens.xml4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values-w820dp/dimens.xml6
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/arrays.xml22
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/colors.xml4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml7
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml102
82 files changed, 236 insertions, 539 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java
index 052d5592e4..57aa512401 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java
@@ -3,8 +3,6 @@ package com.mapbox.mapboxsdk.annotations;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.graphics.Canvas;
-import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
@@ -23,7 +21,10 @@ import java.io.IOException;
import java.io.InputStream;
/**
- * Factory for creating {@link Icon} objects.
+ * Factory for creating Icons from bitmap images.
+ * <p>
+ * {@link Icon} is used to display bitmaps on top of the map using {@link Marker} and {@link MarkerView}.
+ * </p>
*
* @see Icon
*/
@@ -33,23 +34,23 @@ public final class IconFactory {
public static final Bitmap ICON_MARKERVIEW_BITMAP = Bitmap.createBitmap(1, 1, Bitmap.Config.ALPHA_8);
public static final String ICON_MARKERVIEW_ID = ICON_ID_PREFIX + "marker_view";
- private Context mContext;
- private static IconFactory sInstance;
- private Icon mDefaultMarker;
- private Icon mDefaultMarkerView;
- private BitmapFactory.Options mOptions;
+ private Context context;
+ private static IconFactory instance;
+ private Icon defaultMarker;
+ private Icon defaultMarkerView;
+ private BitmapFactory.Options options;
- private int mNextId = 0;
+ private int nextId = 0;
public static synchronized IconFactory getInstance(@NonNull Context context) {
- if (sInstance == null) {
- sInstance = new IconFactory(context.getApplicationContext());
+ if (instance == null) {
+ instance = new IconFactory(context.getApplicationContext());
}
- return sInstance;
+ return instance;
}
private IconFactory(@NonNull Context context) {
- mContext = context;
+ this.context = context;
DisplayMetrics realMetrics = null;
DisplayMetrics metrics = new DisplayMetrics();
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
@@ -60,12 +61,12 @@ public final class IconFactory {
}
wm.getDefaultDisplay().getMetrics(metrics);
- mOptions = new BitmapFactory.Options();
- mOptions.inScaled = true;
- mOptions.inDensity = DisplayMetrics.DENSITY_DEFAULT;
- mOptions.inTargetDensity = metrics.densityDpi;
+ options = new BitmapFactory.Options();
+ options.inScaled = true;
+ options.inDensity = DisplayMetrics.DENSITY_DEFAULT;
+ options.inTargetDensity = metrics.densityDpi;
if (realMetrics != null) {
- mOptions.inScreenDensity = realMetrics.densityDpi;
+ options.inScreenDensity = realMetrics.densityDpi;
}
}
@@ -76,73 +77,27 @@ public final class IconFactory {
* @return The {@link Icon} using the given Bitmap image.
*/
public Icon fromBitmap(@NonNull Bitmap bitmap) {
- if (mNextId < 0) {
+ if (nextId < 0) {
throw new TooManyIconsException();
}
- String id = ICON_ID_PREFIX + ++mNextId;
+ String id = ICON_ID_PREFIX + ++nextId;
return new Icon(id, bitmap);
}
/**
- * Create an {@link Icon} from a given {@link Drawable}.
- *
- * @param drawable A {@link Drawable} object used for creating the {@link Icon}.
- * @return {@link Icon} with the provided {@link Drawable}.
- */
- public Icon fromDrawable(@NonNull Drawable drawable) {
- int width = drawable.getIntrinsicWidth();
- int height = drawable.getIntrinsicHeight();
- return fromDrawable(drawable, width, height);
- }
-
- /**
- * Create an {@link Icon} from a given {@link Drawable}.
- *
- * @param drawable A {@link Drawable} object used for creating the {@link Icon}.
- * @param width An integer greater then zero defining the {@link Icon} width.
- * @param height An integer greater then zero defining the {@link Icon} height.
- * @return {@link Icon} with the provided {@link Drawable}.
- */
- public Icon fromDrawable(@NonNull Drawable drawable, int width, int height) {
- if ((width < 0) || (height < 0)) {
- return null;
- }
-
- Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(bitmap);
- Rect temp = drawable.getBounds();
- Rect bounds = new Rect(0, 0, width, height);
- drawable.setBounds(bounds);
- drawable.draw(canvas);
- drawable.setBounds(temp);
- return fromBitmap(bitmap);
- }
-
- /**
* Create an {@link Icon} using the resource ID of a Bitmap image.
*
* @param resourceId The resource ID of a Bitmap image.
* @return The {@link Icon} that was loaded from the asset or {@code null} if failed to load.
*/
public Icon fromResource(@DrawableRes int resourceId) {
- Drawable drawable = ContextCompat.getDrawable(mContext, resourceId);
- Bitmap bitmap;
+ Drawable drawable = ContextCompat.getDrawable(context, resourceId);
if (drawable instanceof BitmapDrawable) {
BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
- bitmap = bitmapDrawable.getBitmap();
+ return fromBitmap(bitmapDrawable.getBitmap());
} else {
- if (drawable.getIntrinsicWidth() <= 0 || drawable.getIntrinsicHeight() <= 0) {
- bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
- } else {
- bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(),
- Bitmap.Config.ARGB_8888);
- }
-
- Canvas canvas = new Canvas(bitmap);
- drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
- drawable.draw(canvas);
+ throw new IllegalArgumentException("Failed to decode image. The resource provided must be a Bitmap.");
}
- return fromBitmap(bitmap);
}
/**
@@ -151,10 +106,10 @@ public final class IconFactory {
* @return An {@link Icon} with the default {@link Marker} icon.
*/
public Icon defaultMarker() {
- if (mDefaultMarker == null) {
- mDefaultMarker = fromResource(R.drawable.mapbox_marker_icon_default);
+ if (defaultMarker == null) {
+ defaultMarker = fromResource(R.drawable.mapbox_marker_icon_default);
}
- return mDefaultMarker;
+ return defaultMarker;
}
/**
@@ -163,14 +118,14 @@ public final class IconFactory {
* @return An {@link Icon} with the default {@link MarkerView} icon.
*/
public Icon defaultMarkerView() {
- if (mDefaultMarkerView == null) {
- mDefaultMarkerView = fromResource(R.drawable.mapbox_markerview_icon_default);
+ if (defaultMarkerView == null) {
+ defaultMarkerView = fromResource(R.drawable.mapbox_markerview_icon_default);
}
- return mDefaultMarkerView;
+ return defaultMarkerView;
}
private Icon fromInputStream(@NonNull InputStream is) {
- Bitmap bitmap = BitmapFactory.decodeStream(is, null, mOptions);
+ Bitmap bitmap = BitmapFactory.decodeStream(is, null, options);
return fromBitmap(bitmap);
}
@@ -183,7 +138,7 @@ public final class IconFactory {
public Icon fromAsset(@NonNull String assetName) {
InputStream is;
try {
- is = mContext.getAssets().open(assetName);
+ is = context.getAssets().open(assetName);
} catch (IOException ioException) {
return null;
}
@@ -198,7 +153,7 @@ public final class IconFactory {
* load.
*/
public Icon fromPath(@NonNull String absolutePath) {
- Bitmap bitmap = BitmapFactory.decodeFile(absolutePath, mOptions);
+ Bitmap bitmap = BitmapFactory.decodeFile(absolutePath, options);
return fromBitmap(bitmap);
}
@@ -209,12 +164,12 @@ public final class IconFactory {
* @param fileName The name of the Bitmap image file.
* @return The {@link Icon} that was loaded from the asset or {@code null} if failed to load.
* @see <a href="https://developer.android.com/guide/topics/data/data-storage.html#filesInternal">
- * Using the Internal Storage</a>
+ * Using the Internal Storage</a>
*/
public Icon fromFile(@NonNull String fileName) {
FileInputStream is;
try {
- is = mContext.openFileInput(fileName);
+ is = context.openFileInput(fileName);
} catch (FileNotFoundException fileNotFoundException) {
return null;
}
@@ -232,4 +187,5 @@ public final class IconFactory {
public static Icon recreate(@NonNull String iconId, @NonNull Bitmap bitmap) {
return new Icon(iconId, bitmap);
}
+
}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AddRemoveMarkerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AddRemoveMarkerActivity.java
index 883ffa2b9b..c9c0c105fd 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AddRemoveMarkerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AddRemoveMarkerActivity.java
@@ -1,10 +1,10 @@
package com.mapbox.mapboxsdk.testapp.activity.annotation;
import android.os.Bundle;
+import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import com.mapbox.mapboxsdk.annotations.Icon;
-import com.mapbox.mapboxsdk.annotations.IconFactory;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.annotations.MarkerOptions;
import com.mapbox.mapboxsdk.camera.CameraPosition;
@@ -14,6 +14,7 @@ import com.mapbox.mapboxsdk.maps.MapView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
import com.mapbox.mapboxsdk.testapp.R;
+import com.mapbox.mapboxsdk.testapp.utils.IconUtils;
import timber.log.Timber;
@@ -36,15 +37,20 @@ public class AddRemoveMarkerActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_remove_marker);
- final Icon icon1 = IconFactory.getInstance(this).fromResource(R.drawable.ic_arsenal);
- final Icon icon2 = IconFactory.getInstance(this).fromResource(R.drawable.ic_chelsea);
+ // ShapeDrawable to Icon
+ final Icon shapeDrawableIcon = IconUtils.drawableToIcon(this, R.drawable.ic_circle,
+ ContextCompat.getColor(this, R.color.redAccent));
+
+ // VectorDrawable to Icon
+ final Icon vectorDrawableIcon = IconUtils.drawableToIcon(this, R.drawable.ic_layers,
+ ContextCompat.getColor(this, R.color.blueAccent));
lowThresholdMarker = new MarkerOptions()
- .icon(icon1)
+ .icon(shapeDrawableIcon)
.position(new LatLng(-0.1, 0));
highThresholdMarker = new MarkerOptions()
- .icon(icon2)
+ .icon(vectorDrawableIcon)
.position(new LatLng(0.1, 0));
mapView = (MapView) findViewById(R.id.mapView);
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedMarkerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedMarkerActivity.java
index 8df7085ede..5501a8324d 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedMarkerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedMarkerActivity.java
@@ -8,7 +8,9 @@ import android.animation.ValueAnimator;
import android.os.Bundle;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
+import android.support.v4.content.res.ResourcesCompat;
import android.support.v7.app.AppCompatActivity;
+import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import com.mapbox.mapboxsdk.annotations.Icon;
@@ -24,9 +26,12 @@ import com.mapbox.mapboxsdk.maps.MapView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
import com.mapbox.mapboxsdk.testapp.R;
+import com.mapbox.mapboxsdk.testapp.utils.IconUtils;
import com.mapbox.services.commons.models.Position;
import com.mapbox.services.api.utils.turf.TurfMeasurement;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Random;
public class AnimatedMarkerActivity extends AppCompatActivity {
@@ -41,6 +46,9 @@ public class AnimatedMarkerActivity extends AppCompatActivity {
private Runnable animationRunnable;
+ private List<MarkerView> markerViews = new ArrayList<>();
+ private boolean stopped;
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -79,11 +87,15 @@ public class AnimatedMarkerActivity extends AppCompatActivity {
}
private void addPassenger() {
+ if (isActivityStopped()) {
+ return;
+ }
+
LatLng randomLatLng = getLatLngInBounds();
if (passengerMarker == null) {
- Icon icon = IconFactory.getInstance(AnimatedMarkerActivity.this)
- .fromResource(R.drawable.ic_directions_run_black_24dp);
+ Icon icon = IconUtils.drawableToIcon(this, R.drawable.ic_directions_run_black,
+ ResourcesCompat.getColor(getResources(), R.color.blueAccent, getTheme()));
passengerMarker = mapboxMap.addMarker(new MarkerViewOptions()
.position(randomLatLng)
.icon(icon));
@@ -93,6 +105,10 @@ public class AnimatedMarkerActivity extends AppCompatActivity {
}
private void addMainCar() {
+ if (isActivityStopped()) {
+ return;
+ }
+
LatLng randomLatLng = getLatLngInBounds();
if (carMarker == null) {
@@ -105,13 +121,17 @@ public class AnimatedMarkerActivity extends AppCompatActivity {
animateMoveToPassenger(carMarker);
}
});
-
+ markerViews.add(carMarker);
} else {
carMarker.setPosition(randomLatLng);
}
}
private void animateMoveToPassenger(final MarkerView car) {
+ if (isActivityStopped()) {
+ return;
+ }
+
ValueAnimator animator = animateMoveMarker(car, passengerMarker.getPosition());
animator.addListener(new AnimatorListenerAdapter() {
@Override
@@ -123,15 +143,20 @@ public class AnimatedMarkerActivity extends AppCompatActivity {
}
protected void addRandomCar() {
- createCarMarker(getLatLngInBounds(), R.drawable.ic_car_top, new MarkerViewManager.OnMarkerViewAddedListener() {
- @Override
- public void onViewAdded(@NonNull MarkerView markerView) {
- randomlyMoveMarker(markerView);
- }
- });
+ markerViews.add(createCarMarker(getLatLngInBounds(), R.drawable.ic_car_top,
+ new MarkerViewManager.OnMarkerViewAddedListener() {
+ @Override
+ public void onViewAdded(@NonNull MarkerView markerView) {
+ randomlyMoveMarker(markerView);
+ }
+ }));
}
private void randomlyMoveMarker(final MarkerView marker) {
+ if (isActivityStopped()) {
+ return;
+ }
+
ValueAnimator animator = animateMoveMarker(marker, getLatLngInBounds());
// Add listener to restart animation on end
@@ -205,6 +230,19 @@ public class AnimatedMarkerActivity extends AppCompatActivity {
@Override
protected void onStop() {
super.onStop();
+
+ stopped = true;
+
+ // Stop ongoing animations, prevent memory lekas
+ MarkerViewManager markerViewManager = mapboxMap.getMarkerViewManager();
+ for (MarkerView markerView : markerViews) {
+ View view = markerViewManager.getView(markerView);
+ if (view != null) {
+ view.animate().cancel();
+ }
+ }
+
+ // onStop
mapView.onStop();
mapView.removeCallbacks(animationRunnable);
}
@@ -250,4 +288,8 @@ public class AnimatedMarkerActivity extends AppCompatActivity {
Position.fromCoordinates(to.getLongitude(), to.getLatitude())
);
}
+
+ private boolean isActivityStopped() {
+ return stopped;
+ }
}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java
index bd5d836ca9..e1e49de95b 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java
@@ -3,12 +3,9 @@ package com.mapbox.mapboxsdk.testapp.activity.annotation;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.app.ProgressDialog;
-import android.graphics.PorterDuff;
-import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
-import android.support.v4.content.ContextCompat;
import android.support.v4.content.res.ResourcesCompat;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.AppCompatActivity;
@@ -22,7 +19,6 @@ import android.widget.TextView;
import android.widget.Toast;
import com.mapbox.mapboxsdk.annotations.Icon;
-import com.mapbox.mapboxsdk.annotations.IconFactory;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.annotations.MarkerOptions;
import com.mapbox.mapboxsdk.annotations.MarkerViewOptions;
@@ -32,6 +28,7 @@ import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
import com.mapbox.mapboxsdk.testapp.R;
import com.mapbox.mapboxsdk.testapp.utils.GeoParseUtil;
+import com.mapbox.mapboxsdk.testapp.utils.IconUtils;
import org.json.JSONException;
@@ -39,6 +36,7 @@ import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import java.util.Random;
import timber.log.Timber;
@@ -117,11 +115,8 @@ public class BulkMarkerActivity extends AppCompatActivity implements AdapterView
Random random = new Random();
int randomIndex;
- Drawable drawable = ContextCompat.getDrawable(BulkMarkerActivity.this, R.drawable.ic_droppin_24dp);
-
- int redColor = ResourcesCompat.getColor(getResources(), android.R.color.holo_red_dark, getTheme());
- drawable.setColorFilter(redColor, PorterDuff.Mode.SRC_IN);
- Icon icon = IconFactory.getInstance(this).fromDrawable(drawable);
+ int color = ResourcesCompat.getColor(getResources(), R.color.redAccent, getTheme());
+ Icon icon = IconUtils.drawableToIcon(this, R.drawable.ic_droppin, color);
List<MarkerViewOptions> markerOptionsList = new ArrayList<>();
for (int i = 0; i < amount; i++) {
@@ -203,6 +198,9 @@ public class BulkMarkerActivity extends AppCompatActivity implements AdapterView
}
private class FabClickListener implements View.OnClickListener {
+
+ private TextView viewCountView;
+
@Override
public void onClick(final View view) {
if (mapboxMap != null) {
@@ -225,13 +223,15 @@ public class BulkMarkerActivity extends AppCompatActivity implements AdapterView
showMarkers(amount);
}
+ viewCountView = (TextView) findViewById(R.id.countView);
+
mapView.addOnMapChangedListener(new MapView.OnMapChangedListener() {
@Override
public void onMapChanged(@MapView.MapChange int change) {
if (change == MapView.REGION_IS_CHANGING || change == MapView.REGION_DID_CHANGE) {
if (!mapboxMap.getMarkerViewManager().getMarkerViewAdapters().isEmpty()) {
- TextView viewCountView = (TextView) findViewById(R.id.countView);
- viewCountView.setText("ViewCache size " + (mapView.getChildCount() - 5));
+ viewCountView.setText(String.format(Locale.getDefault(), "ViewCache size %d",
+ mapboxMap.getMarkerViewManager().getMarkerViewContainer().getChildCount()));
}
}
}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/DynamicMarkerChangeActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/DynamicMarkerChangeActivity.java
index a6820312d8..85e7aeedef 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/DynamicMarkerChangeActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/DynamicMarkerChangeActivity.java
@@ -4,10 +4,10 @@ import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat;
+import android.support.v4.content.res.ResourcesCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
-import com.mapbox.mapboxsdk.annotations.IconFactory;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.annotations.MarkerOptions;
import com.mapbox.mapboxsdk.geometry.LatLng;
@@ -15,6 +15,7 @@ import com.mapbox.mapboxsdk.maps.MapView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
import com.mapbox.mapboxsdk.testapp.R;
+import com.mapbox.mapboxsdk.testapp.utils.IconUtils;
public class DynamicMarkerChangeActivity extends AppCompatActivity {
@@ -23,7 +24,6 @@ public class DynamicMarkerChangeActivity extends AppCompatActivity {
private MapView mapView;
private MapboxMap mapboxMap;
- private IconFactory iconFactory;
private Marker marker;
@Override
@@ -31,8 +31,6 @@ public class DynamicMarkerChangeActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dynamic_marker);
- iconFactory = IconFactory.getInstance(this);
-
mapView = (MapView) findViewById(R.id.mapView);
mapView.setTag(false);
mapView.onCreate(savedInstanceState);
@@ -43,7 +41,8 @@ public class DynamicMarkerChangeActivity extends AppCompatActivity {
// Create marker
MarkerOptions markerOptions = new MarkerOptions()
.position(LAT_LNG_CHELSEA)
- .icon(iconFactory.fromResource(R.drawable.ic_chelsea))
+ .icon(IconUtils.drawableToIcon(DynamicMarkerChangeActivity.this, R.drawable.ic_stars,
+ ResourcesCompat.getColor(getResources(), R.color.blueAccent, getTheme())))
.title(getString(R.string.dynamic_marker_chelsea_title))
.snippet(getString(R.string.dynamic_marker_chelsea_snippet));
marker = mapboxMap.addMarker(markerOptions);
@@ -69,7 +68,11 @@ public class DynamicMarkerChangeActivity extends AppCompatActivity {
// update marker
marker.setPosition(first ? LAT_LNG_CHELSEA : LAT_LNG_ARSENAL);
- marker.setIcon(iconFactory.fromResource(first ? R.drawable.ic_chelsea : R.drawable.ic_arsenal));
+ marker.setIcon(IconUtils.drawableToIcon(this, R.drawable.ic_stars, first
+ ? ResourcesCompat.getColor(getResources(), R.color.blueAccent, getTheme()) :
+ ResourcesCompat.getColor(getResources(), R.color.redAccent, getTheme())
+ ));
+
marker.setTitle(first
? getString(R.string.dynamic_marker_chelsea_title) : getString(R.string.dynamic_marker_arsenal_title));
marker.setSnippet(first
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewActivity.java
index 6e02284e2a..ee8eb52cd9 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/MarkerViewActivity.java
@@ -156,13 +156,13 @@ public class MarkerViewActivity extends AppCompatActivity {
movingMarkerOne = MarkerViewActivity.this.mapboxMap.addMarker(new MarkerViewOptions()
.position(CarLocation.CAR_0_LNGS[0])
.icon(IconFactory.getInstance(mapView.getContext())
- .fromResource(R.drawable.ic_chelsea))
+ .fromResource(R.drawable.ic_android))
);
movingMarkerTwo = mapboxMap.addMarker(new MarkerViewOptions()
.position(CarLocation.CAR_1_LNGS[0])
.icon(IconFactory.getInstance(mapView.getContext())
- .fromResource(R.drawable.ic_arsenal))
+ .fromResource(R.drawable.ic_android_2))
);
// allow more open infowindows at the same time
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/customlayer/CustomLayerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/customlayer/CustomLayerActivity.java
index 3fbb25805b..d410c349f0 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/customlayer/CustomLayerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/customlayer/CustomLayerActivity.java
@@ -64,7 +64,7 @@ public class CustomLayerActivity extends AppCompatActivity {
} catch (NoSuchLayerException noSuchLayerException) {
Timber.e("No custom layer to remove");
}
- fab.setImageResource(R.drawable.ic_layers_24dp);
+ fab.setImageResource(R.drawable.ic_layers);
} else {
customLayer = new CustomLayer("custom",
ExampleCustomLayer.createContext(),
@@ -72,7 +72,7 @@ public class CustomLayerActivity extends AppCompatActivity {
ExampleCustomLayer.RenderFunction,
ExampleCustomLayer.DeinitializeFunction);
mapboxMap.addLayer(customLayer, "building");
- fab.setImageResource(R.drawable.ic_layers_clear_24dp);
+ fab.setImageResource(R.drawable.ic_layers_clear);
}
}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java
index 5da7a3047b..df6d24900b 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java
@@ -1,17 +1,14 @@
package com.mapbox.mapboxsdk.testapp.activity.infowindow;
import android.graphics.Color;
-import android.graphics.PorterDuff;
-import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-import android.support.v4.content.ContextCompat;
+import android.support.v4.content.res.ResourcesCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;
-import com.mapbox.mapboxsdk.annotations.IconFactory;
import com.mapbox.mapboxsdk.annotations.InfoWindow;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.annotations.MarkerView;
@@ -22,6 +19,7 @@ import com.mapbox.mapboxsdk.maps.MapView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
import com.mapbox.mapboxsdk.testapp.R;
+import com.mapbox.mapboxsdk.testapp.utils.IconUtils;
/**
* Shows how to dynamically update InfoWindow when Using an MapboxMap.InfoWindowAdapter
@@ -84,18 +82,12 @@ public class DynamicInfoWindowAdapterActivity extends AppCompatActivity implemen
}
private MarkerView addMarker(MapboxMap mapboxMap) {
- IconFactory iconFactory = IconFactory.getInstance(this);
- Drawable iconDrawable = ContextCompat.getDrawable(this, R.drawable.ic_location_city_24dp);
- iconDrawable.setColorFilter(
- ContextCompat.getColor(DynamicInfoWindowAdapterActivity.this, R.color.mapbox_blue),
- PorterDuff.Mode.SRC_IN
- );
-
return mapboxMap.addMarker(
new MarkerViewOptions()
.position(paris)
- .icon(iconFactory.fromDrawable(iconDrawable))
- );
+ .icon(IconUtils.drawableToIcon(this, R.drawable.ic_location_city,
+ ResourcesCompat.getColor(getResources(),R.color.mapbox_blue, getTheme()))
+ ));
}
private void addCustomInfoWindowAdapter(final MapboxMap mapboxMap) {
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowAdapterActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowAdapterActivity.java
index f6a07c1310..7026a797d5 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowAdapterActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowAdapterActivity.java
@@ -1,17 +1,13 @@
package com.mapbox.mapboxsdk.testapp.activity.infowindow;
import android.graphics.Color;
-import android.graphics.PorterDuff;
-import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.NonNull;
-import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;
import com.mapbox.mapboxsdk.annotations.Icon;
-import com.mapbox.mapboxsdk.annotations.IconFactory;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.maps.MapView;
@@ -20,22 +16,18 @@ import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
import com.mapbox.mapboxsdk.testapp.R;
import com.mapbox.mapboxsdk.testapp.model.annotations.CityStateMarker;
import com.mapbox.mapboxsdk.testapp.model.annotations.CityStateMarkerOptions;
+import com.mapbox.mapboxsdk.testapp.utils.IconUtils;
public class InfoWindowAdapterActivity extends AppCompatActivity {
private MapView mapView;
private MapboxMap mapboxMap;
- private IconFactory iconFactory;
- private Drawable iconDrawable;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_infowindow_adapter);
- iconFactory = IconFactory.getInstance(this);
- iconDrawable = ContextCompat.getDrawable(this, R.drawable.ic_location_city_24dp);
-
mapView = (MapView) findViewById(R.id.mapView);
mapView.onCreate(savedInstanceState);
mapView.getMapAsync(new OnMapReadyCallback() {
@@ -63,8 +55,7 @@ public class InfoWindowAdapterActivity extends AppCompatActivity {
marker.position(new LatLng(lat, lng));
marker.infoWindowBackground(color);
- iconDrawable.setColorFilter(Color.parseColor(color), PorterDuff.Mode.SRC_IN);
- Icon icon = iconFactory.fromDrawable(iconDrawable);
+ Icon icon = IconUtils.drawableToIcon(this, R.drawable.ic_location_city, Color.parseColor(color));
marker.icon(icon);
return marker;
}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/NavigationDrawerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/NavigationDrawerActivity.java
index 7f59dd3bdb..888482b219 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/NavigationDrawerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/NavigationDrawerActivity.java
@@ -148,8 +148,8 @@ public class NavigationDrawerActivity extends AppCompatActivity {
android.R.layout.simple_list_item_activated_1,
android.R.id.text1,
new String[] {
- getString(R.string.title_section1),
- getString(R.string.title_section2)
+ "Different style",
+ "Show snackbar"
}));
drawerListView.setItemChecked(currentSelectedPosition, true);
return drawerListView;
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CustomSpriteActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CustomSpriteActivity.java
index bcf2fd822c..fa5ddb3802 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CustomSpriteActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CustomSpriteActivity.java
@@ -79,7 +79,7 @@ public class CustomSpriteActivity extends AppCompatActivity {
// lets add a circle below labels!
mapboxMap.addLayer(layer, "waterway-label");
- fab.setImageResource(R.drawable.ic_directions_car_black_24dp);
+ fab.setImageResource(R.drawable.ic_directions_car_black);
} else {
// Update point
point = Point.fromCoordinates(
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationDrawableActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationDrawableActivity.java
index c15e3b6058..c02ddd8c13 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationDrawableActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationDrawableActivity.java
@@ -42,8 +42,8 @@ public class MyLocationDrawableActivity extends AppCompatActivity implements Loc
mapboxMapOptions.styleUrl(Style.MAPBOX_STREETS);
// configure MyLocationView drawables
- mapboxMapOptions.myLocationForegroundDrawable(ContextCompat.getDrawable(this, R.drawable.ic_chelsea));
- mapboxMapOptions.myLocationBackgroundDrawable(ContextCompat.getDrawable(this, R.drawable.ic_arsenal));
+ mapboxMapOptions.myLocationForegroundDrawable(ContextCompat.getDrawable(this, R.drawable.ic_android));
+ mapboxMapOptions.myLocationBackgroundDrawable(ContextCompat.getDrawable(this, R.drawable.ic_android));
mapboxMapOptions.myLocationForegroundTintColor(Color.GREEN);
mapboxMapOptions.myLocationBackgroundTintColor(Color.YELLOW);
mapboxMapOptions.myLocationBackgroundPadding(new int[] {0, 0,
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationToggleActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationToggleActivity.java
index 8bf40e3cf5..9e98d8c6b9 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationToggleActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationToggleActivity.java
@@ -150,9 +150,9 @@ public class MyLocationToggleActivity extends AppCompatActivity {
};
locationServices.addLocationEngineListener(locationListener);
}
- locationToggleFab.setImageResource(R.drawable.ic_location_disabled_24dp);
+ locationToggleFab.setImageResource(R.drawable.ic_location_disabled);
} else {
- locationToggleFab.setImageResource(R.drawable.ic_my_location_24dp);
+ locationToggleFab.setImageResource(R.drawable.ic_my_location);
}
mapboxMap.setMyLocationEnabled(enabled);
}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineDownloadRegionDialog.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineDownloadRegionDialog.java
index b70144123f..c4aa934139 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineDownloadRegionDialog.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineDownloadRegionDialog.java
@@ -37,7 +37,7 @@ public class OfflineDownloadRegionDialog extends DialogFragment {
final EditText regionNameEdit = new EditText(getActivity());
builder.setTitle("Choose a name for the region")
- .setIcon(R.drawable.ic_airplanemode_active_black_24dp)
+ .setIcon(R.drawable.ic_airplanemode_active_black)
.setView(regionNameEdit)
.setPositiveButton("Start", new DialogInterface.OnClickListener() {
@Override
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineListRegionsDialog.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineListRegionsDialog.java
index 65c4102a8c..f717daeada 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineListRegionsDialog.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/model/other/OfflineListRegionsDialog.java
@@ -28,7 +28,7 @@ public class OfflineListRegionsDialog extends DialogFragment {
CharSequence[] items = offlineRegionsNames.toArray(new CharSequence[offlineRegionsNames.size()]);
builder.setTitle("List of offline regions")
- .setIcon(R.drawable.ic_airplanemode_active_black_24dp)
+ .setIcon(R.drawable.ic_airplanemode_active_black)
.setItems(items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/IconUtils.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/IconUtils.java
new file mode 100644
index 0000000000..b6768a91a3
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/utils/IconUtils.java
@@ -0,0 +1,31 @@
+package com.mapbox.mapboxsdk.testapp.utils;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.drawable.Drawable;
+import android.support.annotation.ColorInt;
+import android.support.annotation.DrawableRes;
+import android.support.annotation.NonNull;
+import android.support.v4.content.res.ResourcesCompat;
+import android.support.v4.graphics.drawable.DrawableCompat;
+
+import com.mapbox.mapboxsdk.annotations.Icon;
+import com.mapbox.mapboxsdk.annotations.IconFactory;
+
+public class IconUtils {
+
+ /**
+ * Demonstrates converting any Drawable to an Icon, for use as a marker icon.
+ */
+ public static Icon drawableToIcon(@NonNull Context context, @DrawableRes int id, @ColorInt int colorRes) {
+ Drawable vectorDrawable = ResourcesCompat.getDrawable(context.getResources(), id, context.getTheme());
+ Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(),
+ vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
+ Canvas canvas = new Canvas(bitmap);
+ vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
+ DrawableCompat.setTint(vectorDrawable, colorRes);
+ vectorDrawable.draw(canvas);
+ return IconFactory.getInstance(context).fromBitmap(bitmap);
+ }
+}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/anim/pulse.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/anim/pulse.xml
deleted file mode 100644
index 92440b6b9e..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/anim/pulse.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/animator/rotate_360.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/animator/rotate_360.xml
deleted file mode 100644
index 5bfa6ad72f..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/animator/rotate_360.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<set xmlns:android="http://schemas.android.com/apk/res/android">
- <objectAnimator
- android:propertyName="rotation"
- android:valueFrom="0"
- android:valueTo="360"
- android:valueType="floatType"/>
-</set>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_android.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_android.png
new file mode 100644
index 0000000000..a20277dc1b
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_android.png
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_android_2.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_android_2.png
new file mode 100644
index 0000000000..d1c802c265
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_android_2.png
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_drawer.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_drawer.png
deleted file mode 100644
index c59f601ca3..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-hdpi/ic_drawer.png
+++ /dev/null
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_android.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_android.png
new file mode 100644
index 0000000000..114bb25199
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_android.png
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_android_2.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_android_2.png
new file mode 100644
index 0000000000..62867cdca4
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_android_2.png
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_drawer.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_drawer.png
deleted file mode 100644
index 1ed2c56ee4..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-mdpi/ic_drawer.png
+++ /dev/null
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_android.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_android.png
new file mode 100644
index 0000000000..e80400c4dd
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_android.png
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_android_2.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_android_2.png
new file mode 100644
index 0000000000..1b34d09842
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_android_2.png
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_drawer.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_drawer.png
deleted file mode 100644
index a5fa74def4..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xhdpi/ic_drawer.png
+++ /dev/null
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_android.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_android.png
new file mode 100644
index 0000000000..19be40bf88
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_android.png
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_android_2.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_android_2.png
new file mode 100644
index 0000000000..b44cec791f
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_android_2.png
Binary files differ
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
deleted file mode 100644
index 6fdac4ef09..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_arsenal.png
+++ /dev/null
Binary files differ
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
deleted file mode 100644
index 6cd376b281..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_chelsea.png
+++ /dev/null
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_drawer.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_drawer.png
deleted file mode 100644
index 9c4685d6e0..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxhdpi/ic_drawer.png
+++ /dev/null
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_android.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_android.png
new file mode 100644
index 0000000000..c2c4373973
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_android.png
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_android_2.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_android_2.png
new file mode 100644
index 0000000000..b735fda69f
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_android_2.png
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_taxi_top_small.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_taxi_top_small.png
deleted file mode 100644
index e04c199160..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_taxi_top_small.png
+++ /dev/null
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add.xml
index 6cdfce3074..6cdfce3074 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add_a_photo_black_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add_a_photo_black.xml
index 3d2ba42f3e..3d2ba42f3e 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add_a_photo_black_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_add_a_photo_black.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_airplanemode_active_black_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_airplanemode_active_black.xml
index 55a8d22a54..55a8d22a54 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_airplanemode_active_black_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_airplanemode_active_black.xml
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
deleted file mode 100644
index 1e2d044bee..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_clear_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<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/drawable/ic_delete_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_delete.xml
index f0e8643c35..f0e8643c35 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_delete_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_delete.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_bus_black_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_bus_black.xml
index e16e259792..e16e259792 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_bus_black_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_bus_black.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_car_black_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_car_black.xml
index 6d6337c3ab..6d6337c3ab 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_car_black_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_car_black.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_run_black_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_run_black.xml
index dfa43f020e..dfa43f020e 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_run_black_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_directions_run_black.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_droppin_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_droppin.xml
index a25e7884cd..a25e7884cd 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_droppin_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_droppin.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_input_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_input.xml
index fea69dfb79..fea69dfb79 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_input_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_input.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers.xml
index 944b526c5c..944b526c5c 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers_clear_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers_clear.xml
index 249f57fc65..249f57fc65 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers_clear_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_layers_clear.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_city_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_city.xml
index e9bea94b41..e9bea94b41 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_city_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_city.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_disabled_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_disabled.xml
index 4fedff778b..4fedff778b 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_disabled_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_location_disabled.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_my_location_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_my_location.xml
index eb979016bf..eb979016bf 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_my_location_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_my_location.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_print_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_print.xml
index 7a9bc00287..7a9bc00287 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_print_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_print.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_refresh_24dp.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_refresh.xml
index 20cd9a07d8..20cd9a07d8 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_refresh_24dp.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_refresh.xml
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_stars.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_stars.xml
new file mode 100644
index 0000000000..61c5d7ace2
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/ic_stars.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="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM16.23,18L12,15.45 7.77,18l1.12,-4.81 -3.73,-3.23 4.92,-0.42L12,5l1.92,4.53 4.92,0.42 -3.73,3.23L16.23,18z"/>
+</vector>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/marker.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/marker.xml
new file mode 100644
index 0000000000..71992ebd7f
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable/marker.xml
@@ -0,0 +1,4 @@
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+ <size android:width="10px" android:height="10px"/>
+ <solid android:color="@color/redAccent"/>
+</shape> \ No newline at end of file
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_add_sprite.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_add_sprite.xml
index 380c1ab8de..00dc67ebed 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_add_sprite.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_add_sprite.xml
@@ -23,7 +23,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_add_24dp"
+ android:src="@drawable/ic_add"
app:backgroundTint="@android:color/white"/>
</RelativeLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml
index 258680c78b..341218c406 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_camera_position.xml
@@ -18,7 +18,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_input_24dp"
+ android:src="@drawable/ic_input"
app:backgroundTint="@android:color/white"/>
</android.support.design.widget.CoordinatorLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circle_layer.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circle_layer.xml
index 4aecf36c71..8a21bef8a8 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circle_layer.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circle_layer.xml
@@ -30,7 +30,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_directions_bus_black_24dp"
+ android:src="@drawable/ic_directions_bus_black"
app:backgroundTint="@android:color/white" />
</RelativeLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circlelayer.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circlelayer.xml
deleted file mode 100644
index faac95d83b..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_circlelayer.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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">
-
- <com.mapbox.mapboxsdk.maps.MapView
- android:id="@id/mapView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_below="@id/toolbar"
- app:mapbox_cameraTargetLat="52.519003"
- app:mapbox_cameraTargetLng="13.400972"
- app:mapbox_cameraZoom="16"
- app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"/>
-
- <android.support.design.widget.FloatingActionButton
- android:id="@id/fab"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
- android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_add_24dp"
- app:backgroundTint="@android:color/white"/>
-
-</RelativeLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_custom_layer.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_custom_layer.xml
index 15e6649251..800926f894 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_custom_layer.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_custom_layer.xml
@@ -18,7 +18,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_layers_24dp"
+ android:src="@drawable/ic_layers"
app:backgroundTint="@android:color/white"/>
</android.support.design.widget.CoordinatorLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_debug_mode.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_debug_mode.xml
index 4eec90f580..ffbf2e30a1 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_debug_mode.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_debug_mode.xml
@@ -19,7 +19,7 @@
android:layout_gravity="end|bottom"
android:layout_marginBottom="82dp"
android:layout_marginRight="@dimen/fab_margin"
- android:src="@drawable/ic_refresh_24dp"
+ android:src="@drawable/ic_refresh"
app:backgroundTint="@color/accent"
app:layout_anchorGravity="top"/>
@@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_layers_24dp"
+ android:src="@drawable/ic_layers"
app:backgroundTint="@color/primary"/>
</android.support.design.widget.CoordinatorLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml
deleted file mode 100644
index bc100b6059..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_directions.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout 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_width="match_parent"
- android:layout_height="match_parent"
- app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets" />
-
-</LinearLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_geocoder.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_geocoder.xml
deleted file mode 100644
index d13d16a73e..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_geocoder.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout 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_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="5"
- app:mapbox_cameraTargetLat="38.90962"
- app:mapbox_cameraTargetLng="-77.04341"
- app:mapbox_cameraZoom="15" />
-
- <TextView
- android:id="@+id/message"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:gravity="center" />
-
-</LinearLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter_dynamic.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter_dynamic.xml
deleted file mode 100644
index 134c3f331e..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_infowindow_adapter_dynamic.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout 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_width="match_parent"
- android:layout_height="match_parent"
- app:mapbox_cameraTargetLat="47.798202"
- app:mapbox_cameraTargetLng="7.573781"
- app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets"
- app:mapbox_cameraZoom="4" />
-
-</LinearLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_source.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_source.xml
deleted file mode 100644
index a1d7a8351d..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_location_source.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout 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" />
-
- <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"
- app:mapbox_styleUrl="@string/mapbox_style_mapbox_streets" />
-
- <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_input_24dp"
- app:backgroundTint="@android:color/white" />
-
- </android.support.design.widget.CoordinatorLayout>
-</LinearLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_toggle.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_toggle.xml
index 74a1811339..2ec35faf04 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_toggle.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_my_location_toggle.xml
@@ -17,7 +17,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_my_location_24dp"
+ android:src="@drawable/ic_my_location"
tools:backgroundTint="@color/primary"/>
</android.support.design.widget.CoordinatorLayout>
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 51474d35f0..3f8c384b3f 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_polyline.xml
@@ -24,7 +24,7 @@
android:layout_alignParentRight="true"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_add_24dp"
+ android:src="@drawable/ic_add"
app:backgroundTint="@android:color/white" />
</RelativeLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_print.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_print.xml
index 143f71478f..3ff8caea70 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_print.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_print.xml
@@ -17,7 +17,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_print_24dp"
+ android:src="@drawable/ic_print"
app:backgroundTint="@color/accent"/>
</android.support.design.widget.CoordinatorLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_scroll_by.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_scroll_by.xml
index 46734ed82d..bc24533960 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_scroll_by.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_scroll_by.xml
@@ -91,7 +91,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_input_24dp"
+ android:src="@drawable/ic_input"
app:backgroundTint="@color/white" />
</android.support.design.widget.CoordinatorLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_snapshot.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_snapshot.xml
index 67ee0cc0b2..6b99711e84 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_snapshot.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_snapshot.xml
@@ -34,7 +34,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_add_a_photo_black_24dp"
+ android:src="@drawable/ic_add_a_photo_black"
app:backgroundTint="@android:color/white"/>
</RelativeLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_style_file.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_style_file.xml
index 69954db3c1..b133f3d9a5 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_style_file.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_style_file.xml
@@ -22,7 +22,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/fab_margin"
- android:src="@drawable/ic_add_24dp"
+ android:src="@drawable/ic_add"
app:backgroundTint="@android:color/white"/>
</RelativeLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_surfaceview_mediacontrols.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_surfaceview_mediacontrols.xml
deleted file mode 100644
index 364e86adda..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_surfaceview_mediacontrols.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/toolbar"
- app:mapbox_styleUrl="@string/mapbox_style_light" />
-
- <FrameLayout
- android:id="@+id/container"
- android:layout_width="match_parent"
- android:layout_height="128dp"
- android:layout_alignParentBottom="true"
- android:paddingBottom="48dp"
- android:paddingLeft="16dp"
- android:paddingRight="16dp" />
-
-</RelativeLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_video_view.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_video_view.xml
deleted file mode 100644
index 66e4065e5d..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_video_view.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:mapbox="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".activity.maplayout.VideoViewActivity">
-
- <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" />
-
- <VideoView
- android:id="@+id/video_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true"
- android:layout_margin="16dp" />
-
- <com.mapbox.mapboxsdk.maps.MapView
- android:id="@id/mapView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_below="@id/toolbar"
- mapbox:mapbox_uiAttributionGravity="top"
- mapbox:mapbox_cameraTargetLat="34.4021"
- mapbox:mapbox_cameraTargetLng="-119.7081"
- mapbox:mapbox_uiLogoGravity="top"
- mapbox:mapbox_styleUrl="mapbox://styles/mapbox/streets-v9"
- mapbox:mapbox_cameraZoom="13" />
-
-</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
deleted file mode 100644
index 1bb9134764..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/view_pulse_marker.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?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>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_main.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_main.xml
deleted file mode 100644
index 2c5178af08..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_main.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?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"></menu>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_polyline.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_polyline.xml
index 3dd109a7c1..8549d66042 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_polyline.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_polyline.xml
@@ -3,7 +3,7 @@
xmlns:mapbox="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_id_remove"
- android:icon="@drawable/ic_delete_24dp"
+ android:icon="@drawable/ic_delete"
android:title="@string/action_remove_polylines"
mapbox:showAsAction="ifRoom" />
<item
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/sea_waves.mp4 b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/sea_waves.mp4
deleted file mode 100644
index ac2bcae016..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/sea_waves.mp4
+++ /dev/null
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values-v21/dimens.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values-v21/dimens.xml
deleted file mode 100644
index c6880f0a6d..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values-v21/dimens.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <dimen name="toolbar_padding_top">25dp</dimen>
-</resources>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values-w820dp/dimens.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values-w820dp/dimens.xml
deleted file mode 100644
index 63fc816444..0000000000
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values-w820dp/dimens.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<resources>
- <!-- Example customization of dimensions originally defined in res/values/dimens.xml
- (such as screen margins) for screens with more than 820dp of available width. This
- would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
- <dimen name="activity_horizontal_margin">64dp</dimen>
-</resources>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/arrays.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/arrays.xml
new file mode 100644
index 0000000000..94763342d2
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/arrays.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string-array name="bulk_marker_list">
+ <item>10</item>
+ <item>100</item>
+ <item>500</item>
+ <item>1000</item>
+ <item>10000</item>
+ </string-array>
+
+ <string-array name="user_tracking_mode">
+ <item>Disabled</item>
+ <item>Follow tracking</item>
+ </string-array>
+
+ <string-array name="user_bearing_mode">
+ <item>Disabled</item>
+ <item>GPS bearing</item>
+ <item>Compass bearing</item>
+ <!--<item>Combined mode</item>-->
+ </string-array>
+</resources> \ No newline at end of file
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/colors.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/colors.xml
index cc13e9c7b2..88524d44ea 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/colors.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/colors.xml
@@ -5,10 +5,6 @@
<color name="accent">#E55E5E</color>
<color name="white">#F9F9F9</color>
<color name="mapboxGreen">#56B881</color>
- <color name="mapboxPurple">#8a8acb</color>
-
- <color name="materialGrey">#F5F5F5</color>
- <color name="materialDarkGrey">#DFDFDF</color>
<color name="redAccent">#D50000</color>
<color name="blueAccent">#2962FF</color>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml
index 03727b7fb9..402d42d485 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/dimens.xml
@@ -2,19 +2,12 @@
<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>
<dimen name="map_padding_bottom">256dp</dimen>
<dimen name="map_padding_right">32dp</dimen>
<dimen name="map_padding_top">0dp</dimen>
- <dimen name="toolbar_shadow">4dp</dimen>
<dimen name="locationview_background_drawable_padding">2dp</dimen>
- <dimen name="locationview_padding_top">350dp</dimen>
- <!-- Default screen margins, per the Android Design guidelines. -->
- <dimen name="activity_horizontal_margin">16dp</dimen>
- <dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="navigation_drawer_width">240dp</dimen>
- <dimen name="toolbar_padding_top">0dp</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 aa36616373..2012a92593 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml
@@ -1,17 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
-
<string name="app_name">Mapbox Android SDK TestApp</string>
- <!-- Test Activities -->
- <string name="activity_mapboxmap">MapboxMap Activity</string>
-
- <!-- Fragment -->
+ <!--Activity-->
<string name="activity_map_fragment_suport">Support Map Fragment</string>
<string name="activity_map_fragment">Map Fragment</string>
<string name="activity_multimap">Multiple Maps on Screen</string>
-
- <!-- Annotations -->
<string name="activity_add_bulk_markers">Add Markers In Bulk</string>
<string name="activity_animated_marker">Animated Markers</string>
<string name="activity_dynamic_marker">Dynamic Marker</string>
@@ -20,22 +14,15 @@
<string name="activity_press_for_marker">Press Map For Marker</string>
<string name="activity_view_marker">View Marker API</string>
<string name="activity_add_remove_markers">Add/Remove marker</string>
-
- <!-- InfoWindow-->
<string name="activity_info_window">Standard InfoWindow</string>
<string name="activity_infowindow_adapter">Custom InfoWindow</string>
<string name="activity_dynamic_infowindow_adapter">Custom Dynamic InfoWindow</string>
-
- <!-- Camera -->
<string name="activity_camera_animation_types">Animation Types</string>
<string name="activity_camera_zoom">Zoom Methods</string>
<string name="activity_visible_coordinate_bounds">LatLngBounds Method</string>
<string name="activity_camera_position">CameraPosition Method</string>
<string name="activity_scroll_by">Scroll By Method</string>
-
- <!-- Other -->
<string name="activity_double_map">Double Map Activity</string>
- <string name="activity_back_to_map">Back to map activity</string>
<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 drawable</string>
@@ -66,7 +53,7 @@
<string name="activity_map_in_dialog">Dialog with map</string>
<string name="activity_marker_view_rectangle">Marker views in rectangle</string>
- <!-- Description -->
+ <!--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 location color</string>
@@ -81,7 +68,6 @@
<string name="description_camera_zoom">Different types of zoom methods</string>
<string name="description_minmax_zoom">Configure a max and min zoomlevel</string>
<string name="description_info_window">Learn how to handle the InfoWindow</string>
- <string name="description_info_window_concurrent">InfoWindow example with multiple open</string>
<string name="description_add_bulk_markers">Add Markers In Bulk to a Map</string>
<string name="description_camera_animation_types">Showcase the different animation types</string>
<string name="description_visible_bounds">Center the camera around a bounds</string>
@@ -96,7 +82,6 @@
<string name="description_scroll_by">Scroll with pixels in x,y direction</string>
<string name="description_snapshot">Example to make a snapshot of the map</string>
<string name="description_doublemap">2 maps in a view hierarchy</string>
- <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_viewpager">Use SupportMapFragments in a ViewPager</string>
@@ -119,12 +104,7 @@
<string name="description_marker_view_rectangle">Marker Views within a rectangle</string>
<string name="description_circle_layer">Show bus stops and route in Singapore</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>
- <string name="menuitem_title_bearing_mode_dismiss_on_gesture">Dismiss bearing tracking on gesture</string>
- <string name="menuitem_title_reset">Reset</string>
-
+ <!--Categories-->
<string name="category">category</string>
<string name="category_basic">_Basic</string>
<string name="category_annotation">Annotation</string>
@@ -139,87 +119,43 @@
<string name="category_style">Styling</string>
<string name="category_features">Features</string>
- <string name="action_visible_bounds_explanation">Center map around 2 markers</string>
+ <!--Actions-->
<string name="action_remove_polylines">Remove polylines</string>
-
<string name="action_visibility_polygon">Change visibility</string>
<string name="action_alpha_polygon">Change alpha</string>
<string name="action_points_polygon">Change points</string>
<string name="action_color_polygon">Change color</string>
<string name="action_width_polyline">Change width</string>
+ <!--Menu-->
+ <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>
+ <string name="menuitem_title_bearing_mode_dismiss_on_gesture">Dismiss bearing tracking on gesture</string>
+ <string name="menuitem_title_reset">Reset</string>
+ <string name="menuitem_title_rotate_gesture_enabled">Enable rotate gestures</string>
+ <string name="menuitem_title_scroll_gesture_enabled">Enable scroll gestures</string>
+
+ <!--Button-->
<string name="button_camera_move">Move</string>
<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="button_user_transparent_tint">tran</string>
<string name="button_open_dialog">Open dialog</string>
-
- <string name="label_fps">FPS:</string>
-
- <string name="styleMapboxStreets">Mapbox Streets</string>
- <string name="styleEmerald">Emerald</string>
- <string name="styleLight">Light</string>
- <string name="styleDark">Dark</string>
- <string name="styleSatellite">Satellite</string>
- <string name="styleSatelliteStreets">Satellite Streets</string>
-
- <string-array name="outdoors_class_list">
- <item>Day</item>
- <item>Night</item>
- </string-array>
-
- <string-array name="bulk_marker_list">
- <item>10</item>
- <item>100</item>
- <item>500</item>
- <item>1000</item>
- <item>10000</item>
- </string-array>
-
- <string-array name="user_tracking_mode">
- <item>Disabled</item>
- <item>Follow tracking</item>
- </string-array>
-
- <string-array name="user_bearing_mode">
- <item>Disabled</item>
- <item>GPS bearing</item>
- <item>Compass bearing</item>
- <!--<item>Combined mode</item>-->
- </string-array>
-
- <string name="zoom_botton">Zoom</string>
-
- <string name="scrollby_x_value">X: %1$d</string>
- <string name="scrollby_y_value">Y: %1$d</string>
<string name="button_download_region">Download region</string>
<string name="button_list_regions">List regions</string>
+ <!--Other-->
+ <string name="navigation_drawer_open">Open navigation drawer</string>
+ <string name="navigation_drawer_close">Close navigation drawer</string>
+ <string name="scrollby_x_value">X: %1$d</string>
+ <string name="scrollby_y_value">Y: %1$d</string>
<string name="dialog_camera_position">Animate to new position</string>
-
- <string name="geocoder_instructions">Tap Map To Geocode Where Black Marker Is Currently Located</string>
-
<string name="dynamic_marker_chelsea_title">Chelsea</string>
<string name="dynamic_marker_chelsea_snippet">Stamford Bridge</string>
<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>
-
- <string name="title_section1">Different style</string>
- <string name="title_section2">Show Snackbar</string>
-
- <string name="navigation_drawer_open">Open navigation drawer</string>
- <string name="navigation_drawer_close">Close navigation drawer</string>
-
- <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>