diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-07-13 14:24:18 -0700 |
---|---|---|
committer | Peter Schiller <peterschiller@google.com> | 2016-07-14 16:39:48 -0700 |
commit | 5024503702fa464cb5722a1893118a9a0ea32c3b (patch) | |
tree | 8740a3c731567f26f26299df51984153e1e82dc2 /res/layout/all_apps.xml | |
parent | 7b8f1eaba147ac42a347f3787d0e90b24be015db (diff) | |
download | android_packages_apps_Trebuchet-5024503702fa464cb5722a1893118a9a0ea32c3b.tar.gz android_packages_apps_Trebuchet-5024503702fa464cb5722a1893118a9a0ea32c3b.tar.bz2 android_packages_apps_Trebuchet-5024503702fa464cb5722a1893118a9a0ea32c3b.zip |
Preventing unnecessary layouts on search focus change
Instead of expanding the edittext, using a separate textview
which is shown/hidden as the hint text
Change-Id: Ib4cedeaed9291f972be2ee407c06f4944c983e27
Diffstat (limited to 'res/layout/all_apps.xml')
-rw-r--r-- | res/layout/all_apps.xml | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml index d55fda771..7492a8e77 100644 --- a/res/layout/all_apps.xml +++ b/res/layout/all_apps.xml @@ -59,7 +59,7 @@ android:focusable="true" android:theme="@style/CustomOverscroll.Light" /> - <LinearLayout + <FrameLayout android:id="@+id/search_container" android:layout_width="match_parent" android:layout_height="@dimen/all_apps_search_bar_height" @@ -68,25 +68,28 @@ android:paddingRight="@dimen/container_fastscroll_thumb_max_width" android:gravity="center|bottom" android:orientation="horizontal" - android:saveEnabled="false"> + android:saveEnabled="false" + android:paddingTop="@dimen/all_apps_search_bar_margin_top" > - <ImageView - android:id="@+id/search_icon" + <TextView android:layout_width="wrap_content" android:layout_height="match_parent" - android:scaleType="fitCenter" - android:layout_marginTop="@dimen/all_apps_search_bar_icon_margin_top" - android:paddingEnd="@dimen/all_apps_search_bar_icon_margin_right" - android:src="@drawable/ic_allapps_search" /> + android:gravity="center_vertical" + android:id="@+id/search_hint" + android:layout_gravity="center_horizontal" + android:drawablePadding="@dimen/all_apps_search_bar_icon_margin_right" + android:drawableStart="@drawable/ic_allapps_search" + android:text="@string/all_apps_search_bar_hint" + android:textColor="@drawable/all_apps_search_hint" + android:textSize="16sp" /> <com.android.launcher3.ExtendedEditText android:id="@+id/search_box_input" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/transparent" android:focusableInTouchMode="true" android:gravity="start|center_vertical" - android:hint="@string/all_apps_search_bar_hint" android:imeOptions="actionSearch|flagNoExtractUi" android:inputType="text|textNoSuggestions|textCapWords" android:maxLines="1" @@ -95,7 +98,7 @@ android:textColor="#4c4c4c" android:textColorHint="@drawable/all_apps_search_hint" android:textSize="16sp" /> - </LinearLayout> + </FrameLayout> </com.android.launcher3.allapps.AllAppsRecyclerViewContainerView> <View |