1 <?xml version="1.0" encoding="utf-8"?>
4 * Copyright (C) 2010 The Android Open Source Project
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 xmlns:android="http://schemas.android.com/apk/res/android"
22 android:id="@+id/search_bar"
23 android:layout_width="match_parent"
24 android:layout_height="match_parent"
25 android:orientation="horizontal">
27 <!-- This is actually used for the badge icon *or* the badge label (or neither) -->
29 android:id="@+id/search_badge"
30 android:layout_width="wrap_content"
31 android:layout_height="match_parent"
32 android:gravity="center_vertical"
33 android:layout_marginBottom="2dip"
34 android:drawablePadding="0dip"
35 android:textAppearance="?attr/textAppearanceMedium"
36 android:textColor="?attr/textColorPrimary"
37 android:visibility="gone" />
40 android:id="@+id/search_button"
41 style="?attr/actionButtonStyle"
42 android:layout_width="wrap_content"
43 android:layout_height="match_parent"
44 android:layout_gravity="center_vertical"
45 android:focusable="true"
46 android:contentDescription="@string/searchview_description_search" />
49 android:id="@+id/search_edit_frame"
50 android:layout_width="wrap_content"
51 android:layout_height="match_parent"
52 android:layout_weight="1"
53 android:layout_marginStart="8dip"
54 android:layout_marginEnd="8dip"
55 android:orientation="horizontal"
56 android:layoutDirection="locale">
59 android:id="@+id/search_mag_icon"
60 android:layout_width="@dimen/dropdownitem_icon_width"
61 android:layout_height="wrap_content"
62 android:scaleType="centerInside"
63 android:layout_marginStart="@dimen/dropdownitem_text_padding_left"
64 android:layout_gravity="center_vertical"
65 android:visibility="gone" />
67 <!-- Inner layout contains the app icon, button(s) and EditText -->
69 android:id="@+id/search_plate"
70 android:layout_width="wrap_content"
71 android:layout_height="match_parent"
72 android:layout_weight="1"
73 android:layout_gravity="center_vertical"
74 android:orientation="horizontal">
76 <view class="android.widget.SearchView$SearchAutoComplete"
77 android:id="@+id/search_src_text"
78 android:layout_height="36dip"
79 android:layout_width="0dp"
80 android:layout_weight="1"
81 android:layout_gravity="center_vertical"
82 android:paddingStart="@dimen/dropdownitem_text_padding_left"
83 android:paddingEnd="@dimen/dropdownitem_text_padding_right"
84 android:singleLine="true"
85 android:ellipsize="end"
86 android:background="@null"
87 android:inputType="text|textAutoComplete|textNoSuggestions"
88 android:imeOptions="actionSearch"
89 android:dropDownHeight="wrap_content"
90 android:dropDownAnchor="@id/search_edit_frame"
91 android:dropDownVerticalOffset="0dip"
92 android:dropDownHorizontalOffset="0dip" />
95 android:id="@+id/search_close_btn"
96 android:layout_width="wrap_content"
97 android:layout_height="match_parent"
98 android:paddingStart="8dip"
99 android:paddingEnd="8dip"
100 android:layout_gravity="center_vertical"
101 android:background="?attr/selectableItemBackgroundBorderless"
102 android:focusable="true"
103 android:contentDescription="@string/searchview_description_clear" />
108 android:id="@+id/submit_area"
109 android:orientation="horizontal"
110 android:layout_width="wrap_content"
111 android:layout_height="match_parent">
114 android:id="@+id/search_go_btn"
115 android:layout_width="wrap_content"
116 android:layout_height="match_parent"
117 android:layout_gravity="center_vertical"
118 android:paddingStart="16dip"
119 android:paddingEnd="16dip"
120 android:background="?attr/selectableItemBackgroundBorderless"
121 android:visibility="gone"
122 android:focusable="true"
123 android:contentDescription="@string/searchview_description_submit" />
126 android:id="@+id/search_voice_btn"
127 android:layout_width="wrap_content"
128 android:layout_height="match_parent"
129 android:layout_gravity="center_vertical"
130 android:paddingStart="16dip"
131 android:paddingEnd="16dip"
132 android:background="?attr/selectableItemBackgroundBorderless"
133 android:visibility="gone"
134 android:focusable="true"
135 android:contentDescription="@string/searchview_description_voice" />