blob: 30ba774c9c4fd8f4e3a0a85a510c090f89948d3d [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"
Sailesh Nepal08fd8172014-07-28 06:37:53 -070021 android:paddingStart="@dimen/abc_dropdownitem_text_padding_left"
22 android:paddingEnd="4dip"
Ying Wang1ee37af2014-07-14 17:26:42 -070023 android:paddingLeft="@dimen/abc_dropdownitem_text_padding_left"
24 android:paddingRight="4dip"
25 android:layout_width="match_parent"
Sailesh Nepal08fd8172014-07-28 06:37:53 -070026 android:layout_height="58dip" >
Ying Wang1ee37af2014-07-14 17:26:42 -070027
28 <!-- Icons come first in the layout, since their placement doesn't depend on
29 the placement of the text views. -->
30 <ImageView android:id="@android:id/icon1"
31 android:layout_width="@dimen/abc_dropdownitem_icon_width"
32 android:layout_height="48dip"
33 android:scaleType="centerInside"
Sailesh Nepal08fd8172014-07-28 06:37:53 -070034 android:layout_alignParentStart="true"
Ying Wang1ee37af2014-07-14 17:26:42 -070035 android:layout_alignParentLeft="true"
36 android:layout_alignParentTop="true"
37 android:layout_alignParentBottom="true"
38 android:visibility="invisible" />
39
40 <ImageView android:id="@+id/edit_query"
41 android:layout_width="48dip"
42 android:layout_height="48dip"
43 android:scaleType="centerInside"
Sailesh Nepal08fd8172014-07-28 06:37:53 -070044 android:layout_alignParentEnd="true"
Ying Wang1ee37af2014-07-14 17:26:42 -070045 android:layout_alignParentRight="true"
46 android:layout_alignParentTop="true"
47 android:layout_alignParentBottom="true"
Sailesh Nepal08fd8172014-07-28 06:37:53 -070048 android:background="?attr/selectableItemBackground"
Ying Wang1ee37af2014-07-14 17:26:42 -070049 android:visibility="gone" />
50
Sailesh Nepal08fd8172014-07-28 06:37:53 -070051 <ImageView android:id="@id/android:icon2"
Ying Wang1ee37af2014-07-14 17:26:42 -070052 android:layout_width="48dip"
53 android:layout_height="48dip"
54 android:scaleType="centerInside"
55 android:layout_alignWithParentIfMissing="true"
Sailesh Nepal08fd8172014-07-28 06:37:53 -070056 android:layout_toStartOf="@id/edit_query"
Ying Wang1ee37af2014-07-14 17:26:42 -070057 android:layout_toLeftOf="@id/edit_query"
58 android:layout_alignParentTop="true"
59 android:layout_alignParentBottom="true"
60 android:visibility="gone" />
61
62
63 <!-- The subtitle comes before the title, since the height of the title depends on whether the
64 subtitle is visible or gone. -->
65 <TextView android:id="@android:id/text2"
66 style="?android:attr/dropDownItemStyle"
67 android:textAppearance="?attr/textAppearanceSearchResultSubtitle"
68 android:singleLine="true"
69 android:layout_width="match_parent"
70 android:layout_height="29dip"
71 android:paddingBottom="4dip"
72 android:gravity="top"
Sailesh Nepal08fd8172014-07-28 06:37:53 -070073 android:layout_toEndOf="@android:id/icon1"
74 android:layout_toStartOf="@android:id/icon2"
Ying Wang1ee37af2014-07-14 17:26:42 -070075 android:layout_toRightOf="@android:id/icon1"
76 android:layout_toLeftOf="@android:id/icon2"
77 android:layout_alignWithParentIfMissing="true"
78 android:layout_alignParentBottom="true"
79 android:visibility="gone" />
80
81 <!-- The title is placed above the subtitle, if there is one. If there is no
82 subtitle, it fills the parent. -->
83 <TextView android:id="@android:id/text1"
84 style="?android:attr/dropDownItemStyle"
85 android:textAppearance="?attr/textAppearanceSearchResultTitle"
86 android:singleLine="true"
87 android:layout_width="match_parent"
88 android:layout_height="wrap_content"
89 android:layout_centerVertical="true"
Sailesh Nepal08fd8172014-07-28 06:37:53 -070090 android:layout_toEndOf="@android:id/icon1"
91 android:layout_toStartOf="@android:id/icon2"
Ying Wang1ee37af2014-07-14 17:26:42 -070092 android:layout_toRightOf="@android:id/icon1"
93 android:layout_toLeftOf="@android:id/icon2"
94 android:layout_above="@android:id/text2" />
95
Sailesh Nepal08fd8172014-07-28 06:37:53 -070096</RelativeLayout>