blob: 5a29686984032ab3be0f41f47c6ad81731e010b5 [file] [log] [blame]
Ying Wang1ee37af2014-07-14 17:26:42 -07001<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
Sailesh Nepal08fd8172014-07-28 06:37:53 -07004 * Copyright (C) 2014 The Android Open Source Project
Ying Wang1ee37af2014-07-14 17:26:42 -07005 *
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 */
Ying Wang1ee37af2014-07-14 17:26:42 -070018-->
19
20<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
Ying Wang1ee37af2014-07-14 17:26:42 -070021 android:layout_width="match_parent"
Dharmesh Mokani86e84da2014-08-29 09:24:35 -070022 android:layout_height="58dip"
23 style="@style/RtlOverlay.Widget.AppCompat.Search.DropDown">
Ying Wang1ee37af2014-07-14 17:26:42 -070024
25 <!-- Icons come first in the layout, since their placement doesn't depend on
26 the placement of the text views. -->
27 <ImageView android:id="@android:id/icon1"
28 android:layout_width="@dimen/abc_dropdownitem_icon_width"
29 android:layout_height="48dip"
30 android:scaleType="centerInside"
Ying Wang1ee37af2014-07-14 17:26:42 -070031 android:layout_alignParentTop="true"
32 android:layout_alignParentBottom="true"
Dharmesh Mokani86e84da2014-08-29 09:24:35 -070033 android:visibility="invisible"
34 style="@style/RtlOverlay.Widget.AppCompat.Search.DropDown.Icon1" />
Ying Wang1ee37af2014-07-14 17:26:42 -070035
36 <ImageView android:id="@+id/edit_query"
37 android:layout_width="48dip"
38 android:layout_height="48dip"
39 android:scaleType="centerInside"
Ying Wang1ee37af2014-07-14 17:26:42 -070040 android:layout_alignParentTop="true"
41 android:layout_alignParentBottom="true"
Sailesh Nepal08fd8172014-07-28 06:37:53 -070042 android:background="?attr/selectableItemBackground"
Dharmesh Mokani86e84da2014-08-29 09:24:35 -070043 android:visibility="gone"
44 style="@style/RtlOverlay.Widget.AppCompat.Search.DropDown.Query" />
Ying Wang1ee37af2014-07-14 17:26:42 -070045
Sailesh Nepal08fd8172014-07-28 06:37:53 -070046 <ImageView android:id="@id/android:icon2"
Ying Wang1ee37af2014-07-14 17:26:42 -070047 android:layout_width="48dip"
48 android:layout_height="48dip"
49 android:scaleType="centerInside"
50 android:layout_alignWithParentIfMissing="true"
Ying Wang1ee37af2014-07-14 17:26:42 -070051 android:layout_alignParentTop="true"
52 android:layout_alignParentBottom="true"
Dharmesh Mokani86e84da2014-08-29 09:24:35 -070053 android:visibility="gone"
54 style="@style/RtlOverlay.Widget.AppCompat.Search.DropDown.Icon2" />
Ying Wang1ee37af2014-07-14 17:26:42 -070055
56
57 <!-- The subtitle comes before the title, since the height of the title depends on whether the
58 subtitle is visible or gone. -->
59 <TextView android:id="@android:id/text2"
60 style="?android:attr/dropDownItemStyle"
61 android:textAppearance="?attr/textAppearanceSearchResultSubtitle"
62 android:singleLine="true"
63 android:layout_width="match_parent"
64 android:layout_height="29dip"
65 android:paddingBottom="4dip"
66 android:gravity="top"
Ying Wang1ee37af2014-07-14 17:26:42 -070067 android:layout_alignWithParentIfMissing="true"
68 android:layout_alignParentBottom="true"
69 android:visibility="gone" />
70
71 <!-- The title is placed above the subtitle, if there is one. If there is no
72 subtitle, it fills the parent. -->
73 <TextView android:id="@android:id/text1"
74 style="?android:attr/dropDownItemStyle"
75 android:textAppearance="?attr/textAppearanceSearchResultTitle"
76 android:singleLine="true"
77 android:layout_width="match_parent"
78 android:layout_height="wrap_content"
79 android:layout_centerVertical="true"
Ying Wang1ee37af2014-07-14 17:26:42 -070080 android:layout_above="@android:id/text2" />
81
Sailesh Nepal08fd8172014-07-28 06:37:53 -070082</RelativeLayout>