From fe121a80fa2bfddef0b1c9106431c93d19e8a41e Mon Sep 17 00:00:00 2001 From: liuche Date: Thu, 2 Jul 2020 00:48:31 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/12007: Follow ux mock on Settings --> Search screen (https://github.com/mozilla-mobile/fenix/pull/12177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hakkı Kaan Çalışkan --- .../layout/checkbox_left_sub_preference.xml | 38 +++++++++++++++++++ .../custom_search_engine_radio_button.xml | 7 ++-- .../main/res/layout/preference_cat_style.xml | 2 +- .../layout/preference_search_add_engine.xml | 5 ++- .../res/layout/search_engine_radio_button.xml | 13 ++++--- app/src/main/res/values/dimens.xml | 3 ++ app/src/main/res/xml/search_preferences.xml | 26 ++++--------- 7 files changed, 64 insertions(+), 30 deletions(-) create mode 100644 app/src/main/res/layout/checkbox_left_sub_preference.xml diff --git a/app/src/main/res/layout/checkbox_left_sub_preference.xml b/app/src/main/res/layout/checkbox_left_sub_preference.xml new file mode 100644 index 0000000000..796d6be426 --- /dev/null +++ b/app/src/main/res/layout/checkbox_left_sub_preference.xml @@ -0,0 +1,38 @@ + + + + + + + + diff --git a/app/src/main/res/layout/custom_search_engine_radio_button.xml b/app/src/main/res/layout/custom_search_engine_radio_button.xml index 746b577257..53eaada561 100644 --- a/app/src/main/res/layout/custom_search_engine_radio_button.xml +++ b/app/src/main/res/layout/custom_search_engine_radio_button.xml @@ -13,12 +13,12 @@ android:focusable="true"> diff --git a/app/src/main/res/layout/preference_search_add_engine.xml b/app/src/main/res/layout/preference_search_add_engine.xml index e168591e43..e2710e7322 100644 --- a/app/src/main/res/layout/preference_search_add_engine.xml +++ b/app/src/main/res/layout/preference_search_add_engine.xml @@ -17,7 +17,7 @@ android:layout_height="wrap_content" android:importantForAccessibility="no" android:textAlignment="textStart" - android:layout_marginStart="20dp" + android:layout_marginStart="@dimen/radio_button_preference_horizontal" app:srcCompat="@drawable/ic_new" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" @@ -27,9 +27,10 @@ android:textColor="?primaryText" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="18dp" + android:layout_marginStart="@dimen/radio_button_drawable_padding" android:layout_marginEnd="@dimen/radio_button_padding_horizontal" android:text="@string/search_engine_add_custom_search_engine_title" + android:textSize="16sp" app:layout_constraintStart_toEndOf="@id/add_icon" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toTopOf="parent" diff --git a/app/src/main/res/layout/search_engine_radio_button.xml b/app/src/main/res/layout/search_engine_radio_button.xml index e22bf78743..015807ba2e 100644 --- a/app/src/main/res/layout/search_engine_radio_button.xml +++ b/app/src/main/res/layout/search_engine_radio_button.xml @@ -13,20 +13,20 @@ android:focusable="true"> @@ -38,6 +38,7 @@ android:layout_marginStart="@dimen/radio_button_padding_horizontal" android:layout_marginEnd="@dimen/radio_button_padding_horizontal" android:textAlignment="viewStart" + android:textSize="16sp" app:layout_constraintStart_toEndOf="@id/engine_icon" app:layout_constraintTop_toTopOf="@id/engine_icon" app:layout_constraintEnd_toEndOf="parent" /> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 294a50b4bb..a8e62f014a 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -20,7 +20,9 @@ 8dp 24dp 12dp + 28dp 48dp + 24dp 32dp 16dp 12dp @@ -35,6 +37,7 @@ 16dp 12dp 24dp + 68dp 48dp 8dp diff --git a/app/src/main/res/xml/search_preferences.xml b/app/src/main/res/xml/search_preferences.xml index d6667bb5f0..be7c2604e7 100644 --- a/app/src/main/res/xml/search_preferences.xml +++ b/app/src/main/res/xml/search_preferences.xml @@ -2,7 +2,6 @@ - + android:title="@string/preferences_show_search_shortcuts" /> + android:title="@string/preferences_show_clipboard_suggestions" /> + android:title='@string/preferences_search_browsing_history' /> + android:title='@string/preferences_search_bookmarks' /> + android:title="@string/preferences_show_voice_search" /> + android:title="@string/preferences_show_search_suggestions" /> + android:layout="@layout/checkbox_left_sub_preference" + app:iconSpaceReserved="false" />