Android O SDK.
[android_tools.git] / sdk / platforms / android-26 / data / res / layout / search_bar.xml
blobc81c716b04b63fa169d557fc79aa810257c368e0
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 /*
4 **
5 ** Copyright 2007, The Android Open Source Project
6 **
7 ** Licensed under the Apache License, Version 2.0 (the "License"); 
8 ** you may not use this file except in compliance with the License. 
9 ** You may obtain a copy of the License at 
11 **     http://www.apache.org/licenses/LICENSE-2.0 
13 ** Unless required by applicable law or agreed to in writing, software 
14 ** distributed under the License is distributed on an "AS IS" BASIS, 
15 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
16 ** See the License for the specific language governing permissions and 
17 ** limitations under the License.
19 -->
20 <view
21     xmlns:android="http://schemas.android.com/apk/res/android"
22     class="android.app.SearchDialog$SearchBar"
23     android:id="@+id/search_bar"
24     android:layout_width="match_parent"
25     android:layout_height="wrap_content"
26     android:orientation="vertical"
27     android:background="@color/transparent"
28     android:focusable="true"
29     android:descendantFocusability="afterDescendants">
31     <LinearLayout
32         android:layout_width="match_parent"
33         android:layout_height="wrap_content"
34         android:background="?android:attr/actionModeBackground"
35         android:orientation="horizontal">
37         <!-- Grouped to allow tapping on either item to exit search mode -->
38         <LinearLayout
39             android:id="@id/closeButton"
40             android:layout_width="wrap_content"
41             android:layout_height="48dp"
42             android:orientation="horizontal"
43             android:focusable="true"
44             android:background="?android:attr/selectableItemBackground">
46             <ImageView
47                 android:layout_width="wrap_content"
48                 android:layout_height="wrap_content"
49                 android:layout_gravity="center_vertical"
50                 android:src="?android:attr/homeAsUpIndicator"/>
52             <ImageView
53                 android:id="@+id/search_app_icon"
54                 android:layout_height="32dip"
55                 android:layout_width="32dip"
56                 android:layout_gravity="center_vertical"
57                 android:scaleType="centerInside"
58             />
60         </LinearLayout>
62         <!-- Actual search view with search icon, text field, close
63             and voice buttons -->
64         <SearchView
65             android:id="@+id/search_view"
66             android:layout_width="0dp"
67             android:layout_height="wrap_content"
68             android:layout_weight="1"
69             android:maxWidth="600dip"
70             android:layout_gravity="center_vertical"
71             />
73     </LinearLayout>
75     <ImageView
76         android:layout_width="match_parent"
77         android:layout_height="wrap_content"
78         android:scaleType="fitXY"
79         android:src="@drawable/ab_solid_shadow_holo"/>
80 </view>