Merge pull request #5730 from osmandapp/TransportStopUiImprovements

Fix contrast color for transport stops
This commit is contained in:
Alexander Sytnyk 2018-07-24 15:40:32 +03:00 committed by GitHub
commit f2864c0f13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -811,7 +811,9 @@ public class MenuBuilder {
GradientDrawable shape = new GradientDrawable(); GradientDrawable shape = new GradientDrawable();
shape.setShape(GradientDrawable.RECTANGLE); shape.setShape(GradientDrawable.RECTANGLE);
shape.setCornerRadius(dpToPx(3)); 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.setBackgroundDrawable(shape);
transportRect.setText(adjustRouteRef(route.route.getRef())); transportRect.setText(adjustRouteRef(route.route.getRef()));