blob: 2b8065a60e63c3ca3557c8ca0dae53b1e911fb57 [file] [log] [blame]
Mindy Pereira6f92de62011-12-19 11:31:48 -08001<?xml version="1.0" encoding="utf-8"?>
Vikram Aggarwal5e5ac742011-12-19 08:14:16 -08002<!--
Andy Huang007de152013-04-15 13:34:30 -07003 Copyright (C) 2013 Google Inc.
Vikram Aggarwal5e5ac742011-12-19 08:14:16 -08004 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-->
Mindy Pereira6f92de62011-12-19 11:31:48 -080018
19<!-- This layout is used as a template to create custom view CanvasConversationHeaderView
20 in normal mode. To be able to get the correct measurements, every source field should
21 be populated with data here. E.g:
22 - Text View should set text to a random long string (android:text="@string/long_string")
23 - Image View should set source to a specific asset -->
24<LinearLayout
25 xmlns:android="http://schemas.android.com/apk/res/android"
26 android:layout_width="match_parent"
Andy Huang007de152013-04-15 13:34:30 -070027 android:layout_height="wrap_content"
James Lemieux928308d2014-07-01 18:01:31 -070028 android:minHeight="88dp"
Mindy Pereira6f92de62011-12-19 11:31:48 -080029 android:orientation="vertical">
Andy Huang007de152013-04-15 13:34:30 -070030
Mindy Pereira6f92de62011-12-19 11:31:48 -080031 <LinearLayout
Andrew Sappersteinbe0cb1e2014-01-15 18:37:10 -080032 android:id="@+id/conversation_item_frame"
Mindy Pereira6f92de62011-12-19 11:31:48 -080033 android:layout_width="match_parent"
Andy Huang007de152013-04-15 13:34:30 -070034 android:layout_height="wrap_content"
Andrew Sappersteinbe0cb1e2014-01-15 18:37:10 -080035 android:layout_marginLeft="@dimen/conv_list_padding"
36 android:layout_marginRight="@dimen/conv_list_padding"
Andy Huang007de152013-04-15 13:34:30 -070037 android:orientation="horizontal">
38
Andy Huang007de152013-04-15 13:34:30 -070039 <View
40 android:id="@+id/contact_image"
James Lemieux928308d2014-07-01 18:01:31 -070041 android:layout_width="@dimen/contact_image_width"
42 android:layout_height="@dimen/contact_image_height"
43 android:layout_marginTop="@dimen/conv_list_padding"
Andrew Sappersteina4296c12014-01-10 18:30:16 -080044 style="@style/ConversationListContactImageStyle" />
Andy Huang007de152013-04-15 13:34:30 -070045
46 <LinearLayout
47 android:layout_width="0dp"
48 android:layout_height="wrap_content"
49 android:layout_weight="1"
50 android:orientation="vertical">
51
52 <RelativeLayout
53 android:layout_width="match_parent"
54 android:layout_height="wrap_content">
55
56 <!-- these views overlap horizontally, that's okay. -->
57 <!-- we are only interested in the left edge of senders and the right edge -->
58 <!-- of the date. -->
59 <!-- sendersWidth, clipX, and dateX are dynamically determined later. -->
60
Andy Huangcb1126a2013-04-19 18:49:10 -070061 <FrameLayout
62 android:id="@+id/senders_decoration"
Andy Huang007de152013-04-15 13:34:30 -070063 android:layout_width="wrap_content"
Andy Huangcb1126a2013-04-19 18:49:10 -070064 android:layout_height="wrap_content">
65
66 <!-- for Email -->
67 <!-- top margin should be 12dp, but the asset has 2dp built-in padding -->
68 <ImageView
69 android:id="@+id/reply_state"
70 android:layout_width="wrap_content"
71 android:layout_height="wrap_content"
James Lemieux928308d2014-07-01 18:01:31 -070072 android:layout_marginTop="@dimen/conv_list_padding"
Andrew Sappersteina4296c12014-01-10 18:30:16 -080073 android:src="@drawable/ic_badge_reply_holo_light"
74 style="@style/ConversationListReplyStateStyle" />
Andy Huangcb1126a2013-04-19 18:49:10 -070075
76 <!-- for Gmail -->
77 <ImageView
78 android:id="@+id/personal_indicator"
79 android:layout_width="wrap_content"
80 android:layout_height="wrap_content"
James Lemieux928308d2014-07-01 18:01:31 -070081 android:layout_marginTop="@dimen/conv_list_padding"
Andrew Sappersteina4296c12014-01-10 18:30:16 -080082 android:src="@drawable/ic_email_caret_single"
83 style="@style/ConversationListPersonalIndicatorStyle" />
Andy Huangcb1126a2013-04-19 18:49:10 -070084
85 </FrameLayout>
Andy Huang007de152013-04-15 13:34:30 -070086
87 <TextView
88 android:id="@+id/senders"
89 android:layout_width="match_parent"
90 android:layout_height="wrap_content"
James Lemieux928308d2014-07-01 18:01:31 -070091 android:layout_marginTop="@dimen/conv_list_padding"
92 android:textSize="16sp"
Andy Huang007de152013-04-15 13:34:30 -070093 android:lines="1"
94 android:includeFontPadding="false"
Andrew Sappersteina4296c12014-01-10 18:30:16 -080095 android:text="@string/long_string"
96 style="@style/ConversationListSendersStyle" />
Andy Huang007de152013-04-15 13:34:30 -070097
Scott Kennedy52b280a2013-07-31 13:31:57 -070098 <ImageView
99 android:id="@+id/info_icon"
100 android:layout_width="14dp"
101 android:layout_height="14dp"
James Lemieux928308d2014-07-01 18:01:31 -0700102 android:layout_marginTop="@dimen/conv_list_padding"
Andrew Sappersteina4296c12014-01-10 18:30:16 -0800103 style="@style/ConversationListInfoIconStyle" />
Scott Kennedy52b280a2013-07-31 13:31:57 -0700104
Andy Huang007de152013-04-15 13:34:30 -0700105 <TextView
106 android:id="@+id/date"
107 android:layout_width="wrap_content"
108 android:layout_height="wrap_content"
James Lemieux928308d2014-07-01 18:01:31 -0700109 android:layout_marginTop="@dimen/conv_list_padding"
110 android:layout_alignBaseline="@id/senders"
Andy Huang007de152013-04-15 13:34:30 -0700111 android:textSize="12sp"
112 android:lines="1"
113 android:includeFontPadding="false"
Andrew Sappersteina4296c12014-01-10 18:30:16 -0800114 android:text="@string/long_string"
115 style="@style/ConversationListDateStyle" />
Andy Huang007de152013-04-15 13:34:30 -0700116
Andy Huang007de152013-04-15 13:34:30 -0700117 <ImageView
118 android:id="@+id/paperclip"
119 android:layout_width="wrap_content"
120 android:layout_height="wrap_content"
James Lemieux928308d2014-07-01 18:01:31 -0700121 android:layout_marginTop="17dp"
Andrew Sapperstein26407712014-07-01 16:11:03 -0700122 android:src="@drawable/ic_attach_file_20dp"
Andrew Sappersteina4296c12014-01-10 18:30:16 -0800123 style="@style/ConversationListPaperclipStyle" />
Andy Huang007de152013-04-15 13:34:30 -0700124
125 <!-- for Email -->
126 <View android:id="@+id/color_block"
James Lemieux928308d2014-07-01 18:01:31 -0700127 android:layout_width="@dimen/color_block_width"
128 android:layout_height="@dimen/color_block_height"
129 style="@style/ConversationListColorBlockStyle" />
Andy Huang007de152013-04-15 13:34:30 -0700130
131 </RelativeLayout>
132
James Lemieux928308d2014-07-01 18:01:31 -0700133 <RelativeLayout
Andy Huang007de152013-04-15 13:34:30 -0700134 android:layout_width="match_parent"
135 android:layout_height="wrap_content"
James Lemieux928308d2014-07-01 18:01:31 -0700136 android:layout_marginBottom="@dimen/conv_list_padding">
Andy Huang007de152013-04-15 13:34:30 -0700137
Andrew Sappersteina4296c12014-01-10 18:30:16 -0800138 <ImageView
139 android:id="@+id/star"
140 android:layout_width="wrap_content"
141 android:layout_height="wrap_content"
James Lemieux928308d2014-07-01 18:01:31 -0700142 android:paddingBottom="3dp"
Andrew Sappersteineb58a092014-06-24 14:03:49 -0700143 android:src="@drawable/ic_star_outline_20dp"
James Lemieux928308d2014-07-01 18:01:31 -0700144 style="@style/ConversationListStarStyle"/>
Andrew Sappersteina4296c12014-01-10 18:30:16 -0800145
James Lemieux928308d2014-07-01 18:01:31 -0700146 <TextView
147 android:id="@+id/subject"
James Lemieux63d63602014-07-18 11:15:26 -0700148 android:layout_width="match_parent"
James Lemieux928308d2014-07-01 18:01:31 -0700149 android:layout_height="wrap_content"
James Lemieux0a612a52014-07-11 16:39:45 -0700150 android:layout_marginTop="3dp"
James Lemieux928308d2014-07-01 18:01:31 -0700151 android:includeFontPadding="false"
James Lemieux3a701292014-07-30 18:04:05 -0700152 android:textSize="14sp"
James Lemieux928308d2014-07-01 18:01:31 -0700153 style="@style/ConversationListSubjectStyle"/>
154
James Lemieux64f56822014-07-07 18:14:33 -0700155 <!-- snippet overlaps folders completely in the layout;
156 code will later remove the overlap -->
James Lemieux928308d2014-07-01 18:01:31 -0700157 <TextView
158 android:id="@+id/snippet"
James Lemieux63d63602014-07-18 11:15:26 -0700159 android:layout_width="match_parent"
James Lemieux928308d2014-07-01 18:01:31 -0700160 android:layout_height="wrap_content"
James Lemieux0a612a52014-07-11 16:39:45 -0700161 android:layout_marginTop="3dp"
James Lemieux928308d2014-07-01 18:01:31 -0700162 android:includeFontPadding="false"
James Lemieux928308d2014-07-01 18:01:31 -0700163 android:textSize="14sp"
James Lemieux64f56822014-07-07 18:14:33 -0700164 style="@style/ConversationListSnippetAndFoldersStyle"/>
165
166 <!-- folders overlap snippet completely in the layout;
167 code will later remove the overlap -->
168 <TextView
169 android:id="@+id/folders"
James Lemieux63d63602014-07-18 11:15:26 -0700170 android:layout_width="match_parent"
James Lemieux64f56822014-07-07 18:14:33 -0700171 android:layout_height="wrap_content"
Jin Caoff404bb2014-07-25 10:26:36 -0700172 android:layout_marginTop="4dp"
James Lemieux64f56822014-07-07 18:14:33 -0700173 android:includeFontPadding="false"
Jin Caoff404bb2014-07-25 10:26:36 -0700174 android:textSize="12sp"
James Lemieux64f56822014-07-07 18:14:33 -0700175 style="@style/ConversationListSnippetAndFoldersStyle"/>
James Lemieux928308d2014-07-01 18:01:31 -0700176
177 </RelativeLayout>
Andy Huang007de152013-04-15 13:34:30 -0700178
179 </LinearLayout>
180
Mindy Pereira6f92de62011-12-19 11:31:48 -0800181 </LinearLayout>
Andy Huang007de152013-04-15 13:34:30 -0700182
Vikram Aggarwal5e5ac742011-12-19 08:14:16 -0800183</LinearLayout>