Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | /* |
Sailesh Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 4 | * Copyright (C) 2014 The Android Open Source Project |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 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 | */ |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 18 | --> |
| 19 | |
| 20 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
Sailesh Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 21 | android:paddingStart="@dimen/abc_dropdownitem_text_padding_left" |
| 22 | android:paddingEnd="4dip" |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 23 | android:paddingLeft="@dimen/abc_dropdownitem_text_padding_left" |
| 24 | android:paddingRight="4dip" |
| 25 | android:layout_width="match_parent" |
Sailesh Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 26 | android:layout_height="58dip" > |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 27 | |
| 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 Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 34 | android:layout_alignParentStart="true" |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 35 | 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 Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 44 | android:layout_alignParentEnd="true" |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 45 | android:layout_alignParentRight="true" |
| 46 | android:layout_alignParentTop="true" |
| 47 | android:layout_alignParentBottom="true" |
Sailesh Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 48 | android:background="?attr/selectableItemBackground" |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 49 | android:visibility="gone" /> |
| 50 | |
Sailesh Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 51 | <ImageView android:id="@id/android:icon2" |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 52 | android:layout_width="48dip" |
| 53 | android:layout_height="48dip" |
| 54 | android:scaleType="centerInside" |
| 55 | android:layout_alignWithParentIfMissing="true" |
Sailesh Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 56 | android:layout_toStartOf="@id/edit_query" |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 57 | 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 Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 73 | android:layout_toEndOf="@android:id/icon1" |
| 74 | android:layout_toStartOf="@android:id/icon2" |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 75 | 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 Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 90 | android:layout_toEndOf="@android:id/icon1" |
| 91 | android:layout_toStartOf="@android:id/icon2" |
Ying Wang | 1ee37af | 2014-07-14 17:26:42 -0700 | [diff] [blame] | 92 | android:layout_toRightOf="@android:id/icon1" |
| 93 | android:layout_toLeftOf="@android:id/icon2" |
| 94 | android:layout_above="@android:id/text2" /> |
| 95 | |
Sailesh Nepal | 08fd817 | 2014-07-28 06:37:53 -0700 | [diff] [blame^] | 96 | </RelativeLayout> |