From 6619cfe618d44671a52489654193bd8258e8682a Mon Sep 17 00:00:00 2001 From: Vincent Berthet Date: Fri, 25 Jun 2021 16:25:48 +0200 Subject: [PATCH 1/2] Fix bug when changing line color (see #448) --- android/src/main/java/com/mapbox/mapboxgl/LineController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/mapbox/mapboxgl/LineController.java b/android/src/main/java/com/mapbox/mapboxgl/LineController.java index d7715909..e588f20f 100644 --- a/android/src/main/java/com/mapbox/mapboxgl/LineController.java +++ b/android/src/main/java/com/mapbox/mapboxgl/LineController.java @@ -59,7 +59,7 @@ public void setLineOpacity(float lineOpacity) { @Override public void setLineColor(String lineColor) { - line.setLineColor(ColorUtils.rgbaToColor(lineColor)); + line.setLineColor(lineColor); } @Override From 436d0cd7ba9791f7abf2ac27be50cd05f95bed24 Mon Sep 17 00:00:00 2001 From: Vincent Berthet Date: Thu, 14 Oct 2021 11:16:24 +0200 Subject: [PATCH 2/2] Use Color.parseColor in LineController.setLineColor --- android/src/main/java/com/mapbox/mapboxgl/LineController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/mapbox/mapboxgl/LineController.java b/android/src/main/java/com/mapbox/mapboxgl/LineController.java index e588f20f..af78536e 100644 --- a/android/src/main/java/com/mapbox/mapboxgl/LineController.java +++ b/android/src/main/java/com/mapbox/mapboxgl/LineController.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import java.util.List; +import android.graphics.Color; import android.graphics.PointF; import android.util.Log; @@ -59,7 +60,7 @@ public void setLineOpacity(float lineOpacity) { @Override public void setLineColor(String lineColor) { - line.setLineColor(lineColor); + line.setLineColor(Color.parseColor(lineColor)); } @Override