1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 Copyright (C) 2012 Google Inc. 4 Licensed to The Android Open Source Project. 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 --> 18 19 <FrameLayout 20 xmlns:android="http://schemas.android.com/apk/res/android" 21 android:id="@+id/widget_conversation_list_item" 22 android:layout_width="match_parent" 23 android:layout_height="72sp"> 24 <!-- 25 Remote view doesn't allow changing background so we have to work around 26 by having 2 image views here. 27 --> 28 <ImageView 29 android:id="@+id/widget_unread_background" 30 android:layout_width="match_parent" 31 android:layout_height="match_parent" 32 android:background="@drawable/widget_conversation_unread_selector" /> 33 <ImageView 34 android:id="@+id/widget_read_background" 35 android:layout_width="match_parent" 36 android:layout_height="match_parent" 37 android:background="@drawable/widget_conversation_read_selector" /> 38 <RelativeLayout 39 android:id="@+id/content" 40 android:layout_width="match_parent" 41 android:layout_height="match_parent" 42 android:paddingLeft="16dip" 43 android:paddingRight="16dip"> 44 <RelativeLayout 45 android:id="@+id/labels" 46 android:layout_width="wrap_content" 47 android:layout_height="wrap_content" 48 android:layout_alignParentRight="true" 49 android:gravity="right" > 50 <ImageView 51 android:id="@+id/widget_folder_0" 52 android:layout_width="32dip" 53 android:layout_height="6sp" 54 android:scaleType="fitXY" /> 55 <ImageView 56 android:id="@+id/widget_folder_1" 57 android:layout_width="32dip" 58 android:layout_height="6sp" 59 android:layout_toRightOf="@id/widget_folder_0" 60 android:scaleType="fitXY" /> 61 <ImageView 62 android:id="@+id/widget_folder_2" 63 android:layout_width="32dip" 64 android:layout_height="6sp" 65 android:layout_toRightOf="@id/widget_folder_1" 66 android:scaleType="fitXY" /> 67 </RelativeLayout> 68 <RelativeLayout 69 android:id="@+id/widget_attachment_and_date" 70 android:layout_width="wrap_content" 71 android:layout_height="wrap_content" 72 android:layout_alignParentTop="true" 73 android:layout_alignParentRight="true" 74 android:layout_marginTop="10sp" 75 android:orientation="horizontal" > 76 <!-- Use negative margins to align attachment icon with text --> 77 <ImageView 78 android:id="@+id/widget_attachment" 79 android:layout_width="wrap_content" 80 android:layout_height="wrap_content" 81 android:layout_marginTop="-4sp" /> 82 <TextView 83 android:id="@+id/widget_date" 84 android:layout_width="wrap_content" 85 android:layout_height="wrap_content" 86 android:layout_toRightOf="@id/widget_attachment" /> 87 </RelativeLayout> 88 <TextView 89 android:id="@+id/widget_senders" 90 android:layout_width="wrap_content" 91 android:layout_height="wrap_content" 92 android:layout_alignParentTop="true" 93 android:layout_alignParentLeft="true" 94 android:layout_toLeftOf="@id/widget_attachment_and_date" 95 android:layout_marginTop="10sp" 96 android:paddingRight="16dip" 97 android:singleLine="true" 98 android:ellipsize="end" 99 android:textSize="@dimen/senders_font_size" 100 android:textColor="#58585b" 101 android:includeFontPadding="false" /> 102 <TextView 103 android:id="@+id/widget_subject" 104 android:layout_width="match_parent" 105 android:layout_height="wrap_content" 106 android:layout_below="@id/widget_senders" 107 android:maxLines="2" 108 android:includeFontPadding="false" /> 109 </RelativeLayout> 110 </FrameLayout>