From aa86038b70c27dc0a7a1f8cd57290605e9568e0a Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Wed, 10 Mar 2021 13:46:18 +0200 Subject: [PATCH] Icons in Configure Map / Screen https://github.com/osmandapp/OsmAnd-Issues/issues/512 --- OsmAnd/src/net/osmand/plus/ContextMenuItem.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java index 1ab526cbeb..f7b13fc78d 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java @@ -9,6 +9,7 @@ import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import androidx.annotation.StringRes; import androidx.core.content.ContextCompat; + import net.osmand.plus.ContextMenuAdapter.OnItemDeleteAction; public class ContextMenuItem { @@ -164,7 +165,9 @@ public class ContextMenuItem { return description; } - public OnItemDeleteAction getItemDeleteAction() { return itemDeleteAction; } + public OnItemDeleteAction getItemDeleteAction() { + return itemDeleteAction; + } public ContextMenuAdapter.ItemClickListener getItemClickListener() { return itemClickListener; @@ -207,9 +210,7 @@ public class ContextMenuItem { } public void setColor(Context context, @ColorRes int colorRes) { - if (colorRes != INVALID_ID) { - this.color = ContextCompat.getColor(context, colorRes); - } + color = colorRes != INVALID_ID ? ContextCompat.getColor(context, colorRes) : null; } public void setSelected(boolean selected) {