Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 7c106071 authored by Michael Bestas's avatar Michael Bestas Committed by Michael Bestas
Browse files

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
 - Fixed poor contrast of the search bar text against the background
 - Added back search icon that is always shown, matching Widget search
 - Changed paddings to match Widget search

Change-Id: Ia127da05adff45f8860f0870817aaa9fde8e171c
parent a867d3f2
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@android:color/transparent" android:state_focused="true" />
    <item android:color="?android:attr/textColorSecondary" android:alpha="?android:attr/disabledAlpha" />
</selector>
 No newline at end of file
+8 −4
Original line number Diff line number Diff line
@@ -17,21 +17,25 @@
    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"
    android:textColor="?android:attr/textColorSecondary"
    android:textColorHint="@drawable/all_apps_search_hint"
    android:textColorHint="?android:attr/textColorSecondary"
    android:textSize="20sp" />
 No newline at end of file
+8 −3
Original line number Diff line number Diff line
@@ -101,22 +101,27 @@
        <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"
            android:textColor="?android:attr/textColorSecondary"
            android:textColorHint="@drawable/all_apps_search_hint"
            android:textColorHint="?android:attr/textColorSecondary"
            android:textSize="20sp" />

        <include layout="@layout/all_apps_fast_scroller" />