1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2010 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17 <!-- tablet --> 18 <FrameLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent" 22 android:background="@android:color/white" 23 > 24 <ProgressBar 25 android:id="@+id/loading_progress" 26 android:layout_width="wrap_content" 27 android:layout_height="wrap_content" 28 android:layout_gravity="center" 29 style="?android:attr/progressBarStyleLarge" 30 /> 31 <com.android.email.view.NonLockingScrollView 32 android:id="@+id/main_panel" 33 android:layout_width="match_parent" 34 android:layout_height="match_parent" 35 > 36 <LinearLayout 37 android:layout_width="match_parent" 38 android:layout_height="wrap_content" 39 android:paddingLeft="16dip" 40 android:paddingRight="16dip" 41 android:orientation="vertical" 42 > 43 44 <!-- Subject --> 45 <TextView 46 android:id="@+id/subject" 47 android:layout_width="match_parent" 48 android:layout_height="48dip" 49 android:gravity="center_vertical" 50 style="@style/message_view_subject" 51 /> 52 53 <View 54 android:id="@+id/subject_divider" 55 android:layout_marginBottom="16dip" 56 android:layout_width="match_parent" 57 style="@style/message_view_horizontal_divider" 58 /> 59 60 <!-- Upper header. Outer container needed only since the relative layout 61 params can't be passed in an include tag.--> 62 <FrameLayout 63 android:id="@+id/message_view_header_upper" 64 android:layout_width="match_parent" 65 android:layout_height="wrap_content" 66 > 67 <include layout="@layout/message_view_header_upper" /> 68 </FrameLayout> 69 70 <!-- Addresses, timestamp --> 71 <FrameLayout 72 android:id="@+id/message_view_subheader" 73 android:layout_width="match_parent" 74 android:layout_height="wrap_content" 75 android:layout_marginLeft="16dip" 76 android:layout_marginRight="16dip" 77 > 78 <include layout="@layout/message_view_subheader" /> 79 </FrameLayout> 80 81 <View 82 android:id="@+id/address_divider" 83 android:layout_width="match_parent" 84 style="@style/message_view_horizontal_divider" 85 /> 86 87 <!-- The rest: tab + body + command buttons. --> 88 <!-- Tabs + divider --> 89 <LinearLayout 90 android:id="@+id/message_tabs_section" 91 android:layout_width="match_parent" 92 android:layout_height="wrap_content" 93 android:orientation="vertical" 94 > 95 <LinearLayout 96 android:layout_width="match_parent" 97 android:layout_height="40dip" 98 android:layout_marginLeft="14dip" 99 android:orientation="horizontal" 100 > 101 <Button 102 android:id="@+id/show_message" 103 android:layout_width="128dip" 104 android:layout_height="match_parent" 105 android:gravity="center" 106 android:text="@string/message_view_show_message_action" 107 android:textSize="14dip" 108 android:textColor="@color/text_primary_color" 109 android:singleLine="true" 110 android:ellipsize="end" 111 style="@android:style/Widget.Holo.Light.Tab" 112 /> 113 <Button 114 android:id="@+id/show_invite" 115 android:layout_width="128dip" 116 android:layout_height="match_parent" 117 android:gravity="center" 118 android:text="@string/message_view_show_invite_action" 119 android:textSize="14dip" 120 android:textColor="@color/text_primary_color" 121 android:singleLine="true" 122 android:ellipsize="end" 123 style="@android:style/Widget.Holo.Light.Tab" 124 /> 125 <Button 126 android:id="@+id/show_attachments" 127 android:layout_width="128dip" 128 android:layout_height="match_parent" 129 android:gravity="center" 130 android:textSize="14dip" 131 android:textColor="@color/text_primary_color" 132 android:singleLine="true" 133 android:ellipsize="end" 134 style="@android:style/Widget.Holo.Light.Tab" 135 /> 136 <!-- filler --> 137 <View 138 android:layout_width="0dip" 139 android:layout_height="0dip" 140 android:layout_weight="1" 141 /> 142 <Button 143 android:id="@+id/show_pictures" 144 android:layout_width="wrap_content" 145 android:layout_height="match_parent" 146 android:gravity="center" 147 style="?android:attr/borderlessButtonStyle" 148 android:padding="0dip" 149 android:text="@string/message_view_show_pictures_action" 150 android:textSize="14dip" 151 android:textColor="@color/text_ternary_color" 152 android:drawableRight="@drawable/ic_show_images_holo_light" 153 android:drawablePadding="8dip" 154 /> 155 <Button 156 android:id="@+id/always_show_pictures_button" 157 android:layout_width="wrap_content" 158 android:layout_height="match_parent" 159 android:gravity="center" 160 style="?android:attr/borderlessButtonStyle" 161 android:padding="0dip" 162 android:text="@string/message_view_always_show_pictures_prompt" 163 android:textSize="14dip" 164 android:textColor="@color/text_ternary_color" 165 android:drawableRight="@drawable/ic_show_images_holo_light" 166 android:drawablePadding="8dip" 167 android:visibility="gone" 168 /> 169 <View 170 android:layout_width="16dip" 171 android:layout_height="0dip" 172 /> 173 </LinearLayout> 174 <View 175 android:layout_width="match_parent" 176 style="@style/message_view_horizontal_divider" 177 /> 178 </LinearLayout> 179 180 <!-- margin --> 181 <View 182 android:layout_width="0dip" 183 android:layout_height="16dip" 184 /> 185 186 <!-- content area - only one of them is visible at a time --> 187 <!-- Message body --> 188 <com.android.email.view.RigidWebView 189 android:id="@+id/message_content" 190 android:layout_width="match_parent" 191 android:layout_height="wrap_content" 192 android:background="@android:color/white" 193 android:visibility="gone" 194 /> 195 196 <!-- TODO: get rid of these useless _scroll elements now that 197 they're no longer needed --> 198 <!-- Invite: Even though this section is only for MessageViewFragment, 199 Its visibility is controlled by MessageViewFragmentBase for simplicity. 200 MessageFileViewFragment shouldn't touch this. --> 201 <FrameLayout 202 android:id="@+id/invite_scroll" 203 android:layout_width="match_parent" 204 android:layout_height="wrap_content" 205 android:visibility="gone" 206 > 207 <include layout="@layout/message_view_invitation" /> 208 </FrameLayout> 209 210 <!-- Attachments --> 211 <FrameLayout 212 android:id="@+id/attachments_scroll" 213 android:layout_width="match_parent" 214 android:layout_height="wrap_content" 215 android:visibility="gone" 216 > 217 <LinearLayout 218 android:id="@+id/attachments" 219 android:orientation="vertical" 220 android:layout_width="match_parent" 221 android:layout_height="wrap_content" 222 android:divider="?android:attr/dividerHorizontal" 223 android:showDividers="beginning|middle|end" 224 /> 225 </FrameLayout> 226 </LinearLayout> 227 </com.android.email.view.NonLockingScrollView> 228 </FrameLayout> 229