1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3/* 4 * Copyright (C) 2014 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 xmlns:android="http://schemas.android.com/apk/res/android" 21 android:id="@+id/search_bar" 22 android:layout_width="match_parent" 23 android:layout_height="match_parent" 24 android:orientation="horizontal"> 25 26 <!-- This is actually used for the badge icon *or* the badge label (or neither) --> 27 <TextView 28 android:id="@+id/search_badge" 29 android:layout_width="wrap_content" 30 android:layout_height="match_parent" 31 android:gravity="center_vertical" 32 android:layout_marginBottom="2dip" 33 android:drawablePadding="0dip" 34 android:textAppearance="?android:attr/textAppearanceMedium" 35 android:textColor="?android:attr/textColorPrimary" 36 android:visibility="gone" /> 37 38 <android.support.v7.internal.widget.TintImageView 39 android:id="@+id/search_button" 40 style="?attr/actionButtonStyle" 41 android:layout_width="wrap_content" 42 android:layout_height="match_parent" 43 android:layout_gravity="center_vertical" 44 android:focusable="true" 45 android:contentDescription="@string/abc_searchview_description_search" /> 46 47 <LinearLayout 48 android:id="@+id/search_edit_frame" 49 android:layout_width="wrap_content" 50 android:layout_height="wrap_content" 51 android:layout_weight="1" 52 android:layout_gravity="center_vertical" 53 android:layout_marginTop="4dip" 54 android:layout_marginBottom="4dip" 55 android:layout_marginLeft="8dip" 56 android:layout_marginRight="8dip" 57 android:orientation="horizontal" 58 android:layoutDirection="locale"> 59 60 <android.support.v7.internal.widget.TintImageView 61 android:id="@+id/search_mag_icon" 62 android:layout_width="@dimen/abc_dropdownitem_icon_width" 63 android:layout_height="wrap_content" 64 android:scaleType="centerInside" 65 android:layout_gravity="center_vertical" 66 android:visibility="gone" 67 style="@style/RtlOverlay.Widget.AppCompat.SearchView.MagIcon" /> 68 69 <!-- Inner layout contains the app icon, button(s) and EditText --> 70 <LinearLayout 71 android:id="@+id/search_plate" 72 android:layout_width="wrap_content" 73 android:layout_height="wrap_content" 74 android:layout_weight="1" 75 android:layout_gravity="center_vertical" 76 android:orientation="horizontal"> 77 78 <view class="android.support.v7.widget.SearchView$SearchAutoComplete" 79 android:id="@+id/search_src_text" 80 android:layout_height="36dip" 81 android:layout_width="0dp" 82 android:layout_weight="1" 83 android:minWidth="@dimen/abc_search_view_text_min_width" 84 android:layout_gravity="bottom" 85 android:paddingLeft="@dimen/abc_dropdownitem_text_padding_left" 86 android:paddingRight="@dimen/abc_dropdownitem_text_padding_right" 87 android:singleLine="true" 88 android:ellipsize="end" 89 android:background="@null" 90 android:inputType="text|textAutoComplete|textNoSuggestions" 91 android:imeOptions="actionSearch" 92 android:dropDownHeight="wrap_content" 93 android:dropDownAnchor="@id/search_edit_frame" 94 android:dropDownVerticalOffset="0dip" 95 android:dropDownHorizontalOffset="0dip" /> 96 97 <android.support.v7.internal.widget.TintImageView 98 android:id="@+id/search_close_btn" 99 android:layout_width="wrap_content" 100 android:layout_height="match_parent" 101 android:paddingLeft="8dip" 102 android:paddingRight="8dip" 103 android:layout_gravity="center_vertical" 104 android:background="?attr/selectableItemBackgroundBorderless" 105 android:focusable="true" 106 android:contentDescription="@string/abc_searchview_description_clear" /> 107 108 </LinearLayout> 109 110 <LinearLayout 111 android:id="@+id/submit_area" 112 android:orientation="horizontal" 113 android:layout_width="wrap_content" 114 android:layout_height="match_parent"> 115 116 <android.support.v7.internal.widget.TintImageView 117 android:id="@+id/search_go_btn" 118 android:layout_width="wrap_content" 119 android:layout_height="match_parent" 120 android:layout_gravity="center_vertical" 121 android:paddingLeft="16dip" 122 android:paddingRight="16dip" 123 android:background="?attr/selectableItemBackgroundBorderless" 124 android:visibility="gone" 125 android:focusable="true" 126 android:contentDescription="@string/abc_searchview_description_submit" /> 127 128 <android.support.v7.internal.widget.TintImageView 129 android:id="@+id/search_voice_btn" 130 android:layout_width="wrap_content" 131 android:layout_height="match_parent" 132 android:layout_gravity="center_vertical" 133 android:paddingLeft="16dip" 134 android:paddingRight="16dip" 135 android:background="?attr/selectableItemBackgroundBorderless" 136 android:visibility="gone" 137 android:focusable="true" 138 android:contentDescription="@string/abc_searchview_description_voice" /> 139 </LinearLayout> 140 </LinearLayout> 141</LinearLayout> 142