summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-10-16 18:30:58 +0200
committerTobrun <tobrun@mapbox.com>2018-10-16 20:04:46 +0200
commit62af756ab8250e00a63776c2d32bf3123909eddb (patch)
tree859851e0e273f89f9b979b6d3fb7aa21faf2f598
parent26896f2bafd6cb515547eeefe8791e6720e34eb2 (diff)
downloadqtlocation-mapboxgl-62af756ab8250e00a63776c2d32bf3123909eddb.tar.gz
[android] - use appcompat resource configuration for vector drawables
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java6
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_mapview_internal.xml6
2 files changed, 5 insertions, 7 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
index a7eecfd958..9c800c078f 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
@@ -1,6 +1,5 @@
package com.mapbox.mapboxsdk.maps.widgets;
-import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
@@ -8,10 +7,10 @@ import android.support.annotation.Nullable;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPropertyAnimatorCompat;
import android.support.v4.view.ViewPropertyAnimatorListenerAdapter;
+import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.ImageView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
@@ -24,8 +23,7 @@ import com.mapbox.mapboxsdk.maps.MapboxMap;
* use {@link com.mapbox.mapboxsdk.maps.UiSettings}.
* </p>
*/
-@SuppressLint("AppCompatCustomView")
-public final class CompassView extends ImageView implements Runnable {
+public final class CompassView extends AppCompatImageView implements Runnable {
public static final long TIME_WAIT_IDLE = 500;
public static final long TIME_MAP_NORTH_ANIMATION = 150;
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_mapview_internal.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_mapview_internal.xml
index 8dd4a858df..e7644373fd 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_mapview_internal.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_mapview_internal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
+<merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<FrameLayout
android:id="@+id/markerViewContainer"
@@ -20,7 +20,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"
- android:src="@drawable/mapbox_logo_icon"/>
+ app:srcCompat="@drawable/mapbox_logo_icon"/>
<ImageView
android:visibility="gone"
@@ -31,6 +31,6 @@
android:clickable="true"
android:focusable="true"
android:contentDescription="@string/mapbox_attributionsIconContentDescription"
- android:src="@drawable/mapbox_info_bg_selector"/>
+ app:srcCompat="@drawable/mapbox_info_bg_selector"/>
</merge>