From 720c12645bd2aa6eab1d329ba1460e381cadfe64 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Tue, 9 Jun 2020 10:20:39 +0300 Subject: [PATCH 1/2] Quick Action UI fixes --- .../bottom_sheet_item_primary_descr.xml | 18 +++++++ .../res/layout/preference_toolbar_switch.xml | 10 ++-- .../layout/quick_action_add_dialog_item.xml | 6 ++- OsmAnd/res/layout/quick_action_list.xml | 10 ++-- OsmAnd/res/layout/quick_action_list_item.xml | 22 +++++--- OsmAnd/res/values/attrs.xml | 2 + OsmAnd/res/values/colors.xml | 3 ++ OsmAnd/res/values/styles.xml | 2 + .../quickaction/ConfirmationBottomSheet.java | 2 +- .../quickaction/QuickActionListFragment.java | 52 +++++++++---------- 10 files changed, 80 insertions(+), 47 deletions(-) create mode 100644 OsmAnd/res/layout/bottom_sheet_item_primary_descr.xml diff --git a/OsmAnd/res/layout/bottom_sheet_item_primary_descr.xml b/OsmAnd/res/layout/bottom_sheet_item_primary_descr.xml new file mode 100644 index 0000000000..ad7d7a425c --- /dev/null +++ b/OsmAnd/res/layout/bottom_sheet_item_primary_descr.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/OsmAnd/res/layout/preference_toolbar_switch.xml b/OsmAnd/res/layout/preference_toolbar_switch.xml index c6296d76e2..17fdd398fa 100644 --- a/OsmAnd/res/layout/preference_toolbar_switch.xml +++ b/OsmAnd/res/layout/preference_toolbar_switch.xml @@ -1,12 +1,11 @@ - + android:background="?attr/list_background_color"> - \ No newline at end of file + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/quick_action_add_dialog_item.xml b/OsmAnd/res/layout/quick_action_add_dialog_item.xml index c4222cdfc3..46c13ca86a 100644 --- a/OsmAnd/res/layout/quick_action_add_dialog_item.xml +++ b/OsmAnd/res/layout/quick_action_add_dialog_item.xml @@ -19,16 +19,18 @@ android:layout_height="@dimen/standard_icon_size" android:layout_gravity="center_vertical" android:layout_marginRight="@dimen/content_padding" + android:layout_marginEnd="@dimen/content_padding" android:scaleType="centerInside" android:tint="?attr/default_icon_color" - osmand:srcCompat="@drawable/ic_action_flag" - android:layout_marginEnd="@dimen/content_padding" /> + osmand:srcCompat="@drawable/ic_action_flag" /> @@ -74,15 +74,15 @@ android:id="@+id/delete" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_margin="@dimen/content_padding_half" - android:layout_gravity="center_vertical|end"> + android:layout_gravity="center_vertical|end" + android:layout_margin="@dimen/content_padding_half"> + android:background="?attr/selectableItemBackground" + android:padding="@dimen/content_padding_half"> + android:layout_marginLeft="@dimen/dashCardMargin" + android:layout_marginRight="@dimen/dashCardMargin" + android:layout_gravity="center" + android:padding="@dimen/content_padding_small"> @@ -103,17 +110,18 @@ diff --git a/OsmAnd/res/values/attrs.xml b/OsmAnd/res/values/attrs.xml index 8bc2b87c03..6659534355 100644 --- a/OsmAnd/res/values/attrs.xml +++ b/OsmAnd/res/values/attrs.xml @@ -106,6 +106,8 @@ + + diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml index 6430694639..87f89be049 100644 --- a/OsmAnd/res/values/colors.xml +++ b/OsmAnd/res/values/colors.xml @@ -417,6 +417,9 @@ #3F474B #eeeeee + #252727 + #FFFFFF + #7E33FF #808080 diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index db178fcfb2..c190045cab 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -121,6 +121,7 @@