• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/conversation_item_background_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/conversation_item_background_selector" />
38    <LinearLayout
39        android:id="@+id/content"
40        android:layout_width="match_parent"
41        android:layout_height="match_parent"
42        android:orientation="vertical" >
43        <LinearLayout
44            android:layout_width="match_parent"
45            android:layout_height="wrap_content"
46            android:layout_marginTop="10sp"
47            android:layout_marginLeft="16dp"
48            android:layout_marginRight="16dp"
49            android:gravity="top"
50            android:orientation="horizontal" >
51            <TextView
52                android:id="@+id/widget_senders"
53                android:layout_width="0dp"
54                android:layout_height="wrap_content"
55                android:layout_weight="1"
56                android:singleLine="true"
57                android:ellipsize="end"
58                android:textSize="@dimen/senders_font_size"
59                android:includeFontPadding="false"
60                style="@style/WidgetSendersStyle" />
61            <ImageView
62                android:id="@+id/widget_attachment"
63                android:layout_width="wrap_content"
64                android:layout_height="wrap_content"
65                android:layout_marginTop="4sp"
66                style="@style/WidgetAttachStyle"/>
67            <TextView
68                android:id="@+id/widget_date"
69                android:layout_width="wrap_content"
70                android:layout_height="match_parent"
71                android:gravity="top" />
72        </LinearLayout>
73
74        <TextView
75            android:id="@+id/widget_subject"
76            android:layout_width="match_parent"
77            android:layout_height="wrap_content"
78            android:layout_marginLeft="16dp"
79            android:layout_marginRight="16dp"
80            android:maxLines="1"
81            android:includeFontPadding="false" />
82
83        <TextView
84            android:id="@+id/widget_snippet"
85            android:layout_width="match_parent"
86            android:layout_height="wrap_content"
87            android:layout_marginLeft="16dp"
88            android:layout_marginRight="16dp"
89            android:includeFontPadding="false"
90            android:maxLines="1"/>
91
92        <LinearLayout
93            android:id="@+id/labels"
94            android:layout_width="wrap_content"
95            android:layout_height="0dp"
96            android:layout_weight="1"
97            android:layout_gravity="right|end"
98            android:gravity="bottom" >
99            <ImageView
100                    android:id="@+id/widget_folder_0"
101                    android:layout_width="32dp"
102                    android:layout_height="6sp"
103                    android:scaleType="fitXY" />
104            <ImageView
105                    android:id="@+id/widget_folder_1"
106                    android:layout_width="32dp"
107                    android:layout_height="6sp"
108                    android:scaleType="fitXY" />
109            <ImageView
110                    android:id="@+id/widget_folder_2"
111                    android:layout_width="32dp"
112                    android:layout_height="6sp"
113                    android:scaleType="fitXY" />
114        </LinearLayout>
115    </LinearLayout>
116</FrameLayout>