From 88fc407fa779813dc56af66bace7cfeab8bba5ca Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Wed, 9 Aug 2017 11:08:12 +0300 Subject: [PATCH 1/2] Add selectable background --- OsmAnd/res/layout/fragment_measurement_tool.xml | 5 +++-- OsmAnd/res/layout/measure_points_list_item.xml | 3 ++- .../osmand/plus/measurementtool/MeasurementToolFragment.java | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/layout/fragment_measurement_tool.xml b/OsmAnd/res/layout/fragment_measurement_tool.xml index a1561c3d2f..e5e9b0a53b 100644 --- a/OsmAnd/res/layout/fragment_measurement_tool.xml +++ b/OsmAnd/res/layout/fragment_measurement_tool.xml @@ -20,6 +20,7 @@ android:id="@+id/up_down_row" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/selectableItemBackground" android:paddingBottom="12dp" android:paddingTop="12dp"> @@ -116,7 +117,7 @@ android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_centerVertical="true" - android:background="@null" + android:background="?attr/selectableItemBackground" android:paddingBottom="14dp" android:paddingEnd="12dp" android:paddingLeft="16dp" @@ -132,7 +133,7 @@ android:layout_centerVertical="true" android:layout_toEndOf="@id/undo_point_button" android:layout_toRightOf="@id/undo_point_button" - android:background="@null" + android:background="?attr/selectableItemBackground" android:paddingBottom="14dp" android:paddingEnd="16dp" android:paddingLeft="12dp" diff --git a/OsmAnd/res/layout/measure_points_list_item.xml b/OsmAnd/res/layout/measure_points_list_item.xml index 7932721f15..8a1bf3199f 100644 --- a/OsmAnd/res/layout/measure_points_list_item.xml +++ b/OsmAnd/res/layout/measure_points_list_item.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="48dp" + android:background="?attr/selectableItemBackground" android:descendantFocusability="blocksDescendants"> 0) { showPointsList(mainView, iconsCache.getThemedIcon(R.drawable.ic_action_arrow_down)); } else { hidePointsList(mainView, iconsCache.getThemedIcon(R.drawable.ic_action_arrow_up)); From 0e25331dcb310d7d6fbb633478003aaee0f5e232 Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Wed, 9 Aug 2017 12:12:43 +0300 Subject: [PATCH 2/2] Change resources --- .../res/layout/measure_points_list_item.xml | 22 ++++++++++++++----- OsmAnd/res/values/strings.xml | 2 +- .../MeasurementToolAdapter.java | 3 +++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/OsmAnd/res/layout/measure_points_list_item.xml b/OsmAnd/res/layout/measure_points_list_item.xml index 8a1bf3199f..1114c933ae 100644 --- a/OsmAnd/res/layout/measure_points_list_item.xml +++ b/OsmAnd/res/layout/measure_points_list_item.xml @@ -8,16 +8,26 @@ android:descendantFocusability="blocksDescendants"> + + \ No newline at end of file diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index aa91adc611..1d8f78769b 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -790,7 +790,7 @@ Clear Clear all Save - Save as GPX track + Save as Track Rename Delete Delete all diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolAdapter.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolAdapter.java index 2cadefb5ab..dfa2551c21 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolAdapter.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolAdapter.java @@ -51,6 +51,7 @@ class MeasurementToolAdapter extends RecyclerView.Adapter