Small fixes
This commit is contained in:
parent
7a089f367d
commit
efac53555a
2 changed files with 9 additions and 9 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 = "<body style=\"color:#" + rgbHex + ";\">" + html + "</body>";
|
||||
String rgbHex = Algorithms.colorToString(textColor);
|
||||
html = "<body style=\"color:" + rgbHex + ";\">" + html + "</body>";
|
||||
String encoded = Base64.encodeToString(html.getBytes(), Base64.NO_PADDING);
|
||||
webView.loadData(encoded, "text/html", "base64");
|
||||
|
||||
|
|
Loading…
Reference in a new issue