1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3/* 4 * Copyright (C) 2010 The Android Open Source Project 5 * 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 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 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. 17 */ 18 19--> 20<LinearLayout 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"> 26 27 <!-- This is actually used for the badge icon *or* the badge label (or neither) --> 28 <TextView 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" /> 38 39 <ImageView 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" /> 47 48 <LinearLayout 49 android:id="@+id/search_edit_frame" 50 android:layout_width="wrap_content" 51 android:layout_height="wrap_content" 52 android:layout_weight="1" 53 android:layout_gravity="center_vertical" 54 android:layout_marginTop="4dip" 55 android:layout_marginBottom="4dip" 56 android:layout_marginStart="8dip" 57 android:layout_marginEnd="8dip" 58 android:orientation="horizontal" 59 android:layoutDirection="locale"> 60 61 <ImageView 62 android:id="@+id/search_mag_icon" 63 android:layout_width="@dimen/dropdownitem_icon_width" 64 android:layout_height="wrap_content" 65 android:scaleType="centerInside" 66 android:layout_marginStart="@dimen/dropdownitem_text_padding_left" 67 android:layout_gravity="center_vertical" 68 android:visibility="gone" /> 69 70 <!-- Inner layout contains the app icon, button(s) and EditText --> 71 <LinearLayout 72 android:id="@+id/search_plate" 73 android:layout_width="wrap_content" 74 android:layout_height="wrap_content" 75 android:layout_weight="1" 76 android:layout_gravity="center_vertical" 77 android:orientation="horizontal"> 78 79 <view class="android.widget.SearchView$SearchAutoComplete" 80 android:id="@+id/search_src_text" 81 android:layout_height="36dip" 82 android:layout_width="0dp" 83 android:layout_weight="1" 84 android:minWidth="@dimen/search_view_text_min_width" 85 android:layout_gravity="bottom" 86 android:paddingStart="@dimen/dropdownitem_text_padding_left" 87 android:paddingEnd="@dimen/dropdownitem_text_padding_right" 88 android:singleLine="true" 89 android:ellipsize="end" 90 android:background="@null" 91 android:inputType="text|textAutoComplete|textNoSuggestions" 92 android:imeOptions="actionSearch" 93 android:dropDownHeight="wrap_content" 94 android:dropDownAnchor="@id/search_edit_frame" 95 android:dropDownVerticalOffset="0dip" 96 android:dropDownHorizontalOffset="0dip" /> 97 98 <ImageView 99 android:id="@+id/search_close_btn" 100 android:layout_width="wrap_content" 101 android:layout_height="match_parent" 102 android:paddingStart="8dip" 103 android:paddingEnd="8dip" 104 android:layout_gravity="center_vertical" 105 android:background="?attr/selectableItemBackgroundBorderless" 106 android:focusable="true" 107 android:contentDescription="@string/searchview_description_clear" /> 108 109 </LinearLayout> 110 111 <LinearLayout 112 android:id="@+id/submit_area" 113 android:orientation="horizontal" 114 android:layout_width="wrap_content" 115 android:layout_height="match_parent"> 116 117 <ImageView 118 android:id="@+id/search_go_btn" 119 android:layout_width="wrap_content" 120 android:layout_height="match_parent" 121 android:layout_gravity="center_vertical" 122 android:paddingStart="16dip" 123 android:paddingEnd="16dip" 124 android:background="?attr/selectableItemBackgroundBorderless" 125 android:visibility="gone" 126 android:focusable="true" 127 android:contentDescription="@string/searchview_description_submit" /> 128 129 <ImageView 130 android:id="@+id/search_voice_btn" 131 android:layout_width="wrap_content" 132 android:layout_height="match_parent" 133 android:layout_gravity="center_vertical" 134 android:paddingStart="16dip" 135 android:paddingEnd="16dip" 136 android:background="?attr/selectableItemBackgroundBorderless" 137 android:visibility="gone" 138 android:focusable="true" 139 android:contentDescription="@string/searchview_description_voice" /> 140 </LinearLayout> 141 </LinearLayout> 142</LinearLayout> 143