1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright (C) 2013 The Android Open Source Project
4
5  Licensed under the Apache License, Version 2.0 (the "License");
6  you may not use this file except in compliance with the License.
7  You may obtain a copy of the License at
8
9       http://www.apache.org/licenses/LICENSE-2.0
10
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16-->
17<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
18                android:layout_width="match_parent"
19                android:layout_height="?android:attr/listPreferredItemHeight"
20                style="@style/listViewActivatedStyle">
21
22    <!-- Use standard android.R class icon id instead of app specific id. This is just useful for
23         consistency. Use scaleType=centerCrop to give a nice full cropped image in the assigned
24         space -->
25    <QuickContactBadge android:id="@android:id/icon"
26                       android:layout_height="?android:attr/listPreferredItemHeight"
27                       android:layout_width="?android:attr/listPreferredItemHeight"
28                       android:scaleType="centerCrop"
29                       style="@style/quickContactBadgeStyle"
30                       android:src="@drawable/ic_contact_picture_holo_light"/>
31
32    <!-- Use standard android.R class text2 id instead of app specific id. This is just useful for
33         consistency. This is secondary text and not always visible so by default is has its
34         visibility set to gone -->
35    <TextView android:id="@android:id/text2"
36              android:paddingLeft="@dimen/listview_item_padding"
37              android:paddingRight="@dimen/listview_item_padding"
38              android:layout_width="match_parent"
39              android:layout_height="26dp"
40              android:layout_toRightOf="@android:id/icon"
41              android:layout_alignParentBottom="true"
42              android:layout_alignParentRight="true"
43              android:fontFamily="sans-serif"
44              android:singleLine="true"
45              android:ellipsize="marquee"
46              android:visibility="gone"
47              android:text="@string/search_match_other"
48              android:textAppearance="?android:attr/textAppearanceSmall"/>
49
50    <!-- Use standard android.R class text1 id instead of app specific id. This is just useful for
51         consistency. This view also sets layout_alignWithParentIfMissing=true which lets the view
52         align with the parent view if the text2 view is not part of the view hierarchy (which is
53         its initial state). -->
54    <TextView android:id="@android:id/text1"
55              android:paddingLeft="@dimen/listview_item_padding"
56              android:paddingRight="@dimen/listview_item_padding"
57              android:layout_width="match_parent"
58              android:layout_height="wrap_content"
59              android:layout_above="@android:id/text2"
60              android:layout_toRightOf="@android:id/icon"
61              android:gravity="center_vertical"
62              android:layout_alignParentRight="true"
63              android:layout_alignParentTop="true"
64              android:layout_alignWithParentIfMissing="true"
65              android:fontFamily="sans-serif-light"
66              android:singleLine="true"
67              android:ellipsize="marquee"
68              android:textAppearance="?android:attr/textAppearanceLarge"/>
69
70</RelativeLayout>
71