Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
Vikram Aggarwal | 5e5ac74 | 2011-12-19 08:14:16 -0800 | [diff] [blame] | 2 | <!-- |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 3 | Copyright (C) 2013 Google Inc. |
Vikram Aggarwal | 5e5ac74 | 2011-12-19 08:14:16 -0800 | [diff] [blame] | 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 | --> |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 18 | |
| 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 Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 27 | android:layout_height="wrap_content" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 28 | android:minHeight="88dp" |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 29 | android:orientation="vertical"> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 30 | |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 31 | <LinearLayout |
Andrew Sapperstein | be0cb1e | 2014-01-15 18:37:10 -0800 | [diff] [blame] | 32 | android:id="@+id/conversation_item_frame" |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 33 | android:layout_width="match_parent" |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 34 | android:layout_height="wrap_content" |
Andrew Sapperstein | be0cb1e | 2014-01-15 18:37:10 -0800 | [diff] [blame] | 35 | android:layout_marginLeft="@dimen/conv_list_padding" |
| 36 | android:layout_marginRight="@dimen/conv_list_padding" |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 37 | android:orientation="horizontal"> |
| 38 | |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 39 | <View |
| 40 | android:id="@+id/contact_image" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 41 | android:layout_width="@dimen/contact_image_width" |
| 42 | android:layout_height="@dimen/contact_image_height" |
| 43 | android:layout_marginTop="@dimen/conv_list_padding" |
Andrew Sapperstein | a4296c1 | 2014-01-10 18:30:16 -0800 | [diff] [blame] | 44 | style="@style/ConversationListContactImageStyle" /> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 45 | |
| 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 Huang | cb1126a | 2013-04-19 18:49:10 -0700 | [diff] [blame] | 61 | <FrameLayout |
| 62 | android:id="@+id/senders_decoration" |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 63 | android:layout_width="wrap_content" |
Andy Huang | cb1126a | 2013-04-19 18:49:10 -0700 | [diff] [blame] | 64 | 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 Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 72 | android:layout_marginTop="@dimen/conv_list_padding" |
Andrew Sapperstein | a4296c1 | 2014-01-10 18:30:16 -0800 | [diff] [blame] | 73 | android:src="@drawable/ic_badge_reply_holo_light" |
| 74 | style="@style/ConversationListReplyStateStyle" /> |
Andy Huang | cb1126a | 2013-04-19 18:49:10 -0700 | [diff] [blame] | 75 | |
| 76 | <!-- for Gmail --> |
| 77 | <ImageView |
| 78 | android:id="@+id/personal_indicator" |
| 79 | android:layout_width="wrap_content" |
| 80 | android:layout_height="wrap_content" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 81 | android:layout_marginTop="@dimen/conv_list_padding" |
Andrew Sapperstein | a4296c1 | 2014-01-10 18:30:16 -0800 | [diff] [blame] | 82 | android:src="@drawable/ic_email_caret_single" |
| 83 | style="@style/ConversationListPersonalIndicatorStyle" /> |
Andy Huang | cb1126a | 2013-04-19 18:49:10 -0700 | [diff] [blame] | 84 | |
| 85 | </FrameLayout> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 86 | |
| 87 | <TextView |
| 88 | android:id="@+id/senders" |
| 89 | android:layout_width="match_parent" |
| 90 | android:layout_height="wrap_content" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 91 | android:layout_marginTop="@dimen/conv_list_padding" |
| 92 | android:textSize="16sp" |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 93 | android:lines="1" |
| 94 | android:includeFontPadding="false" |
Andrew Sapperstein | a4296c1 | 2014-01-10 18:30:16 -0800 | [diff] [blame] | 95 | android:text="@string/long_string" |
| 96 | style="@style/ConversationListSendersStyle" /> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 97 | |
Scott Kennedy | 52b280a | 2013-07-31 13:31:57 -0700 | [diff] [blame] | 98 | <ImageView |
| 99 | android:id="@+id/info_icon" |
| 100 | android:layout_width="14dp" |
| 101 | android:layout_height="14dp" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 102 | android:layout_marginTop="@dimen/conv_list_padding" |
Andrew Sapperstein | a4296c1 | 2014-01-10 18:30:16 -0800 | [diff] [blame] | 103 | style="@style/ConversationListInfoIconStyle" /> |
Scott Kennedy | 52b280a | 2013-07-31 13:31:57 -0700 | [diff] [blame] | 104 | |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 105 | <TextView |
| 106 | android:id="@+id/date" |
| 107 | android:layout_width="wrap_content" |
| 108 | android:layout_height="wrap_content" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 109 | android:layout_marginTop="@dimen/conv_list_padding" |
| 110 | android:layout_alignBaseline="@id/senders" |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 111 | android:textSize="12sp" |
| 112 | android:lines="1" |
| 113 | android:includeFontPadding="false" |
Andrew Sapperstein | a4296c1 | 2014-01-10 18:30:16 -0800 | [diff] [blame] | 114 | android:text="@string/long_string" |
| 115 | style="@style/ConversationListDateStyle" /> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 116 | |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 117 | <ImageView |
| 118 | android:id="@+id/paperclip" |
| 119 | android:layout_width="wrap_content" |
| 120 | android:layout_height="wrap_content" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 121 | android:layout_marginTop="17dp" |
Andrew Sapperstein | 2640771 | 2014-07-01 16:11:03 -0700 | [diff] [blame] | 122 | android:src="@drawable/ic_attach_file_20dp" |
Andrew Sapperstein | a4296c1 | 2014-01-10 18:30:16 -0800 | [diff] [blame] | 123 | style="@style/ConversationListPaperclipStyle" /> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 124 | |
| 125 | <!-- for Email --> |
| 126 | <View android:id="@+id/color_block" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 127 | android:layout_width="@dimen/color_block_width" |
| 128 | android:layout_height="@dimen/color_block_height" |
| 129 | style="@style/ConversationListColorBlockStyle" /> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 130 | |
| 131 | </RelativeLayout> |
| 132 | |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 133 | <RelativeLayout |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 134 | android:layout_width="match_parent" |
| 135 | android:layout_height="wrap_content" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 136 | android:layout_marginBottom="@dimen/conv_list_padding"> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 137 | |
Andrew Sapperstein | a4296c1 | 2014-01-10 18:30:16 -0800 | [diff] [blame] | 138 | <ImageView |
| 139 | android:id="@+id/star" |
| 140 | android:layout_width="wrap_content" |
| 141 | android:layout_height="wrap_content" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 142 | android:paddingBottom="3dp" |
Andrew Sapperstein | eb58a09 | 2014-06-24 14:03:49 -0700 | [diff] [blame] | 143 | android:src="@drawable/ic_star_outline_20dp" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 144 | style="@style/ConversationListStarStyle"/> |
Andrew Sapperstein | a4296c1 | 2014-01-10 18:30:16 -0800 | [diff] [blame] | 145 | |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 146 | <TextView |
| 147 | android:id="@+id/subject" |
James Lemieux | 63d6360 | 2014-07-18 11:15:26 -0700 | [diff] [blame] | 148 | android:layout_width="match_parent" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 149 | android:layout_height="wrap_content" |
James Lemieux | 0a612a5 | 2014-07-11 16:39:45 -0700 | [diff] [blame] | 150 | android:layout_marginTop="3dp" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 151 | android:includeFontPadding="false" |
James Lemieux | 3a70129 | 2014-07-30 18:04:05 -0700 | [diff] [blame] | 152 | android:textSize="14sp" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 153 | style="@style/ConversationListSubjectStyle"/> |
| 154 | |
James Lemieux | 64f5682 | 2014-07-07 18:14:33 -0700 | [diff] [blame] | 155 | <!-- snippet overlaps folders completely in the layout; |
| 156 | code will later remove the overlap --> |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 157 | <TextView |
| 158 | android:id="@+id/snippet" |
James Lemieux | 63d6360 | 2014-07-18 11:15:26 -0700 | [diff] [blame] | 159 | android:layout_width="match_parent" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 160 | android:layout_height="wrap_content" |
James Lemieux | 0a612a5 | 2014-07-11 16:39:45 -0700 | [diff] [blame] | 161 | android:layout_marginTop="3dp" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 162 | android:includeFontPadding="false" |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 163 | android:textSize="14sp" |
James Lemieux | 64f5682 | 2014-07-07 18:14:33 -0700 | [diff] [blame] | 164 | 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 Lemieux | 63d6360 | 2014-07-18 11:15:26 -0700 | [diff] [blame] | 170 | android:layout_width="match_parent" |
James Lemieux | 64f5682 | 2014-07-07 18:14:33 -0700 | [diff] [blame] | 171 | android:layout_height="wrap_content" |
Jin Cao | ff404bb | 2014-07-25 10:26:36 -0700 | [diff] [blame] | 172 | android:layout_marginTop="4dp" |
James Lemieux | 64f5682 | 2014-07-07 18:14:33 -0700 | [diff] [blame] | 173 | android:includeFontPadding="false" |
Jin Cao | ff404bb | 2014-07-25 10:26:36 -0700 | [diff] [blame] | 174 | android:textSize="12sp" |
James Lemieux | 64f5682 | 2014-07-07 18:14:33 -0700 | [diff] [blame] | 175 | style="@style/ConversationListSnippetAndFoldersStyle"/> |
James Lemieux | 928308d | 2014-07-01 18:01:31 -0700 | [diff] [blame] | 176 | |
| 177 | </RelativeLayout> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 178 | |
| 179 | </LinearLayout> |
| 180 | |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 181 | </LinearLayout> |
Andy Huang | 007de15 | 2013-04-15 13:34:30 -0700 | [diff] [blame] | 182 | |
Vikram Aggarwal | 5e5ac74 | 2011-12-19 08:14:16 -0800 | [diff] [blame] | 183 | </LinearLayout> |