diff options
author | Michael Bestas <mkbestas@gmail.com> | 2022-01-19 23:24:39 +0200 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-05-06 14:30:30 +0800 |
commit | c3d064af9216eacea370117fbeae26c8fb0bbc80 (patch) | |
tree | 9b2567a68ebca39d10c8bae29e0bb9274b26adc0 | |
parent | a75e84926a94be113614d7a2cf297db5d7eafc68 (diff) |
Launcher3: Fix search bar UI in All Apps
Commit Ifa9fabe3a8236513fad8030c0bd8ed4d27ebd549 improved the look
of the search bar, however it had a few issues and the overall
look did not match Settings or Widget search style.
The following improvements have been made:
- Centered the search bar text vertically inside the search bar
- Added back search icon that is always shown, matching Widget search
- Changed paddings to match Widget search
Change-Id: Ia127da05adff45f8860f0870817aaa9fde8e171c
-rw-r--r-- | res/layout/search_container_all_apps.xml | 10 | ||||
-rw-r--r-- | res/layout/secondary_launcher.xml | 9 |
2 files changed, 14 insertions, 5 deletions
diff --git a/res/layout/search_container_all_apps.xml b/res/layout/search_container_all_apps.xml index 5ebf9c8cf8..f166f49967 100644 --- a/res/layout/search_container_all_apps.xml +++ b/res/layout/search_container_all_apps.xml @@ -17,18 +17,22 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@id/search_container_all_apps" android:layout_width="match_parent" - android:layout_height="@dimen/all_apps_search_bar_field_height" + android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_gravity="top|center_horizontal" android:background="@drawable/bg_all_apps_searchbox" android:elevation="0dp" android:focusableInTouchMode="true" + android:gravity="center_vertical" android:hint="@string/all_apps_search_bar_hint" android:imeOptions="actionSearch|flagNoExtractUi" android:inputType="text|textNoSuggestions|textCapWords" android:maxLines="1" - android:padding="8dp" - android:paddingStart="16dp" + android:paddingVertical="12dp" + android:paddingStart="12dp" + android:paddingEnd="0dp" + android:drawablePadding="8dp" + android:drawableStart="@drawable/ic_allapps_search" android:saveEnabled="false" android:scrollHorizontally="true" android:singleLine="true" diff --git a/res/layout/secondary_launcher.xml b/res/layout/secondary_launcher.xml index 131de0011d..d46362855a 100644 --- a/res/layout/secondary_launcher.xml +++ b/res/layout/secondary_launcher.xml @@ -101,17 +101,22 @@ <com.android.launcher3.allapps.search.AppsSearchContainerLayout android:id="@id/search_container_all_apps" android:layout_width="match_parent" - android:layout_height="@dimen/all_apps_search_bar_field_height" + android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_gravity="top|center_horizontal" android:background="@drawable/bg_all_apps_searchbox" android:elevation="0dp" android:focusableInTouchMode="true" + android:gravity="center_vertical" android:hint="@string/all_apps_search_bar_hint" android:imeOptions="actionSearch|flagNoExtractUi" android:inputType="text|textNoSuggestions|textCapWords" android:maxLines="1" - android:padding="8dp" + android:paddingVertical="12dp" + android:paddingStart="12dp" + android:paddingEnd="0dp" + android:drawablePadding="8dp" + android:drawableStart="@drawable/ic_allapps_search" android:saveEnabled="false" android:scrollHorizontally="true" android:singleLine="true" |