search_dropdown_item_icons_2line.xml revision 4aedb39a49bda340f871c8fac2239de4fe549b03
1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3/* 4** 5** Copyright 2008, 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 10** 11** http://www.apache.org/licenses/LICENSE-2.0 12** 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. 18*/ 19--> 20 21<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 22 android:paddingLeft="4dip" 23 android:paddingRight="2dip" 24 android:layout_width="match_parent" 25 android:layout_height="?android:attr/searchResultListItemHeight" > 26 27 <!-- Icons come first in the layout, since their placement doesn't depend on 28 the placement of the text views. --> 29 <ImageView android:id="@android:id/icon1" 30 android:layout_width="48dip" 31 android:layout_height="48dip" 32 android:scaleType="centerInside" 33 android:layout_alignParentLeft="true" 34 android:layout_alignParentTop="true" 35 android:layout_alignParentBottom="true" 36 android:visibility="gone" /> 37 38 <ImageView android:id="@+id/edit_query" 39 android:layout_width="48dip" 40 android:layout_height="48dip" 41 android:scaleType="centerInside" 42 android:layout_alignParentRight="true" 43 android:layout_alignParentTop="true" 44 android:layout_alignParentBottom="true" 45 android:src="?attr/searchViewEditQuery" 46 android:background="?attr/searchViewEditQueryBackground" 47 android:visibility="gone" /> 48 49 <ImageView android:id="@android:id/icon2" 50 android:layout_width="48dip" 51 android:layout_height="48dip" 52 android:scaleType="centerInside" 53 android:layout_alignWithParentIfMissing="true" 54 android:layout_toLeftOf="@id/edit_query" 55 android:layout_alignParentTop="true" 56 android:layout_alignParentBottom="true" 57 android:visibility="gone" /> 58 59 60 <!-- The subtitle comes before the title, since the height of the title depends on whether the 61 subtitle is visible or gone. --> 62 <TextView android:id="@android:id/text2" 63 style="?android:attr/dropDownItemStyle" 64 android:textAppearance="?android:attr/textAppearanceSearchResultSubtitle" 65 android:singleLine="true" 66 android:layout_width="match_parent" 67 android:layout_height="29dip" 68 android:paddingBottom="4dip" 69 android:gravity="top" 70 android:layout_toRightOf="@android:id/icon1" 71 android:layout_toLeftOf="@android:id/icon2" 72 android:layout_alignWithParentIfMissing="true" 73 android:layout_alignParentBottom="true" 74 android:visibility="gone" /> 75 76 <!-- The title is placed above the subtitle, if there is one. If there is no 77 subtitle, it fills the parent. --> 78 <TextView android:id="@android:id/text1" 79 style="?android:attr/dropDownItemStyle" 80 android:textAppearance="?android:attr/textAppearanceSearchResultTitle" 81 android:singleLine="true" 82 android:layout_width="match_parent" 83 android:layout_height="wrap_content" 84 android:layout_centerVertical="true" 85 android:layout_toRightOf="@android:id/icon1" 86 android:layout_toLeftOf="@android:id/icon2" 87 android:layout_above="@android:id/text2" /> 88 89</RelativeLayout> 90