From ea86f2b1d7ee681acd88292a7da650195cd2ff82 Mon Sep 17 00:00:00 2001 From: Chumva Date: Mon, 23 Jul 2018 18:34:37 +0300 Subject: [PATCH] fix contrast color in menu rows for transport stop --- OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java index 70e4a6fc9a..182e345381 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java @@ -811,7 +811,9 @@ public class MenuBuilder { GradientDrawable shape = new GradientDrawable(); shape.setShape(GradientDrawable.RECTANGLE); shape.setCornerRadius(dpToPx(3)); - shape.setColor(route.getColor(mapActivity.getMyApplication(), !light)); + int bgColor = route.getColor(app, !light); + shape.setColor(bgColor); + transportRect.setTextColor(UiUtilities.getContrastColor(app, bgColor, true)); transportRect.setBackgroundDrawable(shape); transportRect.setText(adjustRouteRef(route.route.getRef()));