diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2018-10-29 11:30:15 +0100 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-10-29 16:38:00 +0100 |
commit | c7b417e24747dbe9a0dbdf698dbba9776f66bcdb (patch) | |
tree | c7b646b4ca0dac9663bac92e83d5b21e00b5f4ab /platform/android/MapboxGLAndroidSDK | |
parent | 516a2858a240fbab2e9de37ffc041408b7c48340 (diff) | |
download | qtlocation-mapboxgl-c7b417e24747dbe9a0dbdf698dbba9776f66bcdb.tar.gz |
[android] - move CameraPositionActivity to use FragmetnActivity above AppCompatActivity
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK')
2 files changed, 4 insertions, 9 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java index 16f42c9b0f..600402db03 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java @@ -595,7 +595,6 @@ public final class UiSettings { * <p> * Sets the tint of the attribution view. Use this to change the color of the attribution. * </p> - * By default, the logo is tinted with the primary color of your theme. * * @param tintColor Color to tint the attribution. */ diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/ColorUtils.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/ColorUtils.java index 3a53794e50..f180eda809 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/ColorUtils.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/ColorUtils.java @@ -4,14 +4,12 @@ import android.content.Context; import android.content.res.ColorStateList; import android.content.res.Resources; import android.graphics.Color; -import android.graphics.drawable.Drawable; import android.os.Build; import android.support.annotation.ColorInt; import android.support.annotation.NonNull; -import android.support.v4.graphics.drawable.DrawableCompat; +import android.support.v4.widget.ImageViewCompat; import android.util.TypedValue; import android.widget.ImageView; - import com.mapbox.mapboxsdk.R; import com.mapbox.mapboxsdk.exceptions.ConversionException; @@ -109,12 +107,10 @@ public class ColorUtils { * @param tintColor The color to tint. */ public static void setTintList(@NonNull ImageView imageView, @ColorInt int tintColor) { - Drawable originalDrawable = imageView.getDrawable(); - Drawable wrappedDrawable = DrawableCompat.wrap(originalDrawable); - DrawableCompat.setTintList(wrappedDrawable, getSelector(tintColor)); + ImageViewCompat.setImageTintList(imageView, getSelector(tintColor)); } - static int normalizeColorComponent(String value) { + private static int normalizeColorComponent(String value) { return (int) (Float.parseFloat(value) * 255); } @@ -151,7 +147,7 @@ public class ColorUtils { * @return String rgba color */ public static String colorToRgbaString(@ColorInt int color) { - String alpha = new DecimalFormat("#.###").format(((float)((color >> 24) & 0xFF)) / 255.0f); + String alpha = new DecimalFormat("#.###").format(((float) ((color >> 24) & 0xFF)) / 255.0f); return String.format(Locale.US, "rgba(%d, %d, %d, %s)", (color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF, alpha); } |