[android] - use US local when converting between int color and RGBA String.
This commit is contained in:
@@ -8,6 +8,8 @@ import android.support.annotation.ColorInt;
|
||||
import com.mapbox.mapboxsdk.style.functions.Function;
|
||||
import com.mapbox.mapboxsdk.style.functions.CameraFunction;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Constructs paint/layout properties for Layers
|
||||
*
|
||||
@@ -2352,7 +2354,6 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
|
||||
*
|
||||
@@ -2364,9 +2365,9 @@ public class PropertyFactory {
|
||||
return new LayoutPropertyValue<>("text-optional", function);
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public static String colorToRgbaString(@ColorInt int value) {
|
||||
return String.format("rgba(%d, %d, %d, %d)", (value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, (value >> 24) & 0xFF);
|
||||
return String.format(Locale.US,"rgba(%d, %d, %d, %d)",
|
||||
(value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, (value >> 24) & 0xFF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user