all_apps_search_bar.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright (C) 2015 The Android Open Source Project
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <FrameLayout
  15. xmlns:android="http://schemas.android.com/apk/res/android"
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. android:background="@drawable/all_apps_search_bg" >
  19. <LinearLayout
  20. android:id="@+id/search_container"
  21. android:layout_width="match_parent"
  22. android:layout_height="@dimen/all_apps_search_bar_height"
  23. android:layout_gravity="start|center_vertical"
  24. android:orientation="horizontal"
  25. android:visibility="invisible" >
  26. <ImageView
  27. android:id="@+id/dismiss_search_button"
  28. android:layout_width="wrap_content"
  29. android:layout_height="wrap_content"
  30. android:layout_gravity="center_vertical"
  31. android:layout_marginLeft="16dp"
  32. android:layout_marginStart="16dp"
  33. android:contentDescription="@string/all_apps_button_label"
  34. android:src="@drawable/ic_arrow_back_grey" />
  35. <com.android.launcher3.ExtendedEditText
  36. android:id="@+id/search_box_input"
  37. android:layout_width="match_parent"
  38. android:layout_height="match_parent"
  39. android:background="@android:color/transparent"
  40. android:focusableInTouchMode="true"
  41. android:gravity="fill_horizontal|center_vertical"
  42. android:hint="@string/all_apps_search_bar_hint"
  43. android:inputType="text|textNoSuggestions|textCapWords"
  44. android:imeOptions="actionSearch|flagNoExtractUi"
  45. android:maxLines="1"
  46. android:paddingLeft="8dp"
  47. android:scrollHorizontally="true"
  48. android:singleLine="true"
  49. android:textColor="#4c4c4c"
  50. android:textColorHint="#9c9c9c"
  51. android:textSize="16sp" />
  52. </LinearLayout>
  53. <ImageView
  54. android:id="@+id/search_button"
  55. android:layout_width="wrap_content"
  56. android:layout_height="@dimen/all_apps_search_bar_height"
  57. android:layout_gravity="end|center_vertical"
  58. android:layout_marginEnd="16dp"
  59. android:layout_marginRight="16dp"
  60. android:contentDescription="@string/all_apps_search_bar_hint"
  61. android:src="@drawable/ic_search_grey" />
  62. </FrameLayout>