qsb.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright (C) 2011 The Android Open Source Project
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. -->
  13. <RelativeLayout
  14. xmlns:android="http://schemas.android.com/apk/res/android"
  15. xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
  16. android:layout_width="match_parent"
  17. android:layout_height="match_parent"
  18. android:background="@drawable/search_frame">
  19. <!-- Global search icon -->
  20. <com.android.launcher3.HolographicLinearLayout
  21. style="@style/SearchButton.WithPaddingStart"
  22. launcher:sourceImageViewId="@+id/search_button"
  23. android:id="@+id/search_button_container"
  24. android:layout_width="match_parent"
  25. android:layout_height="match_parent"
  26. android:layout_gravity="center_vertical"
  27. android:layout_centerVertical="true"
  28. android:layout_alignParentStart="true"
  29. android:layout_toStartOf="@+id/voice_button_container"
  30. android:onClick="onClickSearchButton"
  31. android:focusable="true"
  32. android:clickable="true"
  33. android:contentDescription="@string/accessibility_search_button">
  34. <ImageView
  35. android:id="@+id/search_button"
  36. android:layout_width="wrap_content"
  37. android:layout_height="match_parent"
  38. android:layout_gravity="start"
  39. android:scaleType="fitCenter"
  40. android:src="@drawable/ic_home_search_normal_holo"
  41. android:adjustViewBounds="true" />
  42. </com.android.launcher3.HolographicLinearLayout>
  43. <!-- Voice search icon -->
  44. <com.android.launcher3.HolographicLinearLayout
  45. style="@style/SearchButton"
  46. launcher:sourceImageViewId="@+id/voice_button"
  47. android:id="@+id/voice_button_container"
  48. android:layout_width="@dimen/app_icon_size"
  49. android:layout_height="match_parent"
  50. android:layout_gravity="center_vertical"
  51. android:layout_centerVertical="true"
  52. android:layout_alignParentEnd="true"
  53. android:paddingEnd="8dp"
  54. android:paddingRight="8dp"
  55. android:onClick="onClickVoiceButton"
  56. android:focusable="true"
  57. android:clickable="true"
  58. android:contentDescription="@string/accessibility_voice_search_button">
  59. <ImageView
  60. android:id="@+id/voice_button"
  61. android:layout_width="match_parent"
  62. android:layout_height="match_parent"
  63. android:layout_gravity="end"
  64. android:scaleType="fitCenter"
  65. android:src="@drawable/ic_home_voice_search_holo"
  66. android:adjustViewBounds="true" />
  67. </com.android.launcher3.HolographicLinearLayout>
  68. </RelativeLayout>