diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java index 269f0e822a..a761b508f2 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java @@ -28,6 +28,13 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.view.ContextThemeWrapper; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; + import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.data.Amenity; @@ -83,13 +90,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; -import androidx.appcompat.view.ContextThemeWrapper; -import androidx.core.content.ContextCompat; -import androidx.core.graphics.drawable.DrawableCompat; - import static net.osmand.plus.mapcontextmenu.builders.cards.ImageCard.GetImageCardsTask.GetImageCardsListener; public class MenuBuilder { diff --git a/OsmAnd/src/net/osmand/plus/views/layers/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/layers/POIMapLayer.java index dc2d6b794c..758588228f 100644 --- a/OsmAnd/src/net/osmand/plus/views/layers/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/layers/POIMapLayer.java @@ -302,8 +302,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon webView.getSettings().setTextZoom((int) (app.getResources().getConfiguration().fontScale * 100f)); boolean light = app.getSettings().isLightContent(); int textColor = ContextCompat.getColor(app, light ? R.color.text_color_primary_light : R.color.text_color_primary_dark); - String rgbHex = Integer.toHexString(textColor).substring(2, 8); - html = "" + html + ""; + String rgbHex = Algorithms.colorToString(textColor); + html = "" + html + ""; String encoded = Base64.encodeToString(html.getBytes(), Base64.NO_PADDING); webView.loadData(encoded, "text/html", "base64");