From a03cc63616f55382c924e9d4b0e590ebd0ef8812 Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Wed, 20 Sep 2017 10:43:04 +0300 Subject: [PATCH 1/3] Extract default color from loop --- OsmAnd/src/net/osmand/plus/MapMarkersHelper.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java b/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java index 3876fbcab8..74df197aeb 100644 --- a/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java +++ b/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java @@ -27,11 +27,9 @@ import java.util.Collections; import java.util.Comparator; import java.util.Date; import java.util.Iterator; -import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Locale; -import java.util.Map; import static net.osmand.data.PointDescription.POINT_TYPE_MAP_MARKER; @@ -396,8 +394,9 @@ public class MapMarkersHelper { } List gpxPoints = new LinkedList<>(gpx.getPoints()); + int defColor = ContextCompat.getColor(ctx, R.color.marker_red); for (WptPt pt : gpxPoints) { - group.setColor(pt.getColor(ContextCompat.getColor(ctx, R.color.marker_red))); + group.setColor(pt.getColor(defColor)); addNewMarkerIfNeeded(group, dbMarkers, new LatLon(pt.lat, pt.lon), pt.name); } From 949978734b9ee8ae2bf4221284bc3156d931a96e Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Wed, 20 Sep 2017 10:54:29 +0300 Subject: [PATCH 2/3] Disable focusability on switches --- ...fragment_marker_show_direction_bottom_sheet_dialog.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/fragment_marker_show_direction_bottom_sheet_dialog.xml b/OsmAnd/res/layout/fragment_marker_show_direction_bottom_sheet_dialog.xml index 27b9b86b1b..e758017d95 100644 --- a/OsmAnd/res/layout/fragment_marker_show_direction_bottom_sheet_dialog.xml +++ b/OsmAnd/res/layout/fragment_marker_show_direction_bottom_sheet_dialog.xml @@ -140,7 +140,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" - android:clickable="false"/> + android:clickable="false" + android:focusable="false" + android:focusableInTouchMode="false"/> + android:clickable="false" + android:focusable="false" + android:focusableInTouchMode="false"/> Date: Wed, 20 Sep 2017 10:54:29 +0300 Subject: [PATCH 3/3] Disable focusability on switches --- ...gment_marker_show_direction_bottom_sheet_dialog.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/fragment_marker_show_direction_bottom_sheet_dialog.xml b/OsmAnd/res/layout/fragment_marker_show_direction_bottom_sheet_dialog.xml index 27b9b86b1b..d92053dc9c 100644 --- a/OsmAnd/res/layout/fragment_marker_show_direction_bottom_sheet_dialog.xml +++ b/OsmAnd/res/layout/fragment_marker_show_direction_bottom_sheet_dialog.xml @@ -140,7 +140,10 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" - android:clickable="false"/> + android:background="@null" + android:clickable="false" + android:focusable="false" + android:focusableInTouchMode="false"/> + android:background="@null" + android:clickable="false" + android:focusable="false" + android:focusableInTouchMode="false"/>