1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2008 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 <!-- small --> 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:orientation="vertical" 38 android:layout_width="match_parent" 39 android:layout_height="match_parent" 40 > 41 <TextView 42 android:id="@+id/subject" 43 android:layout_width="match_parent" 44 android:layout_height="wrap_content" 45 android:layout_marginTop="8dip" 46 android:layout_marginBottom="4dip" 47 android:layout_marginLeft="8dip" 48 android:layout_marginRight="8dip" 49 android:textAppearance="?android:attr/textAppearanceSmall" 50 android:textColor="?android:attr/textColorSecondary" 51 android:textStyle="bold" 52 /> 53 <!-- Upper header area. --> 54 <include layout="@layout/message_view_header_upper" /> 55 56 <!-- Addresses, timestamp, "show details" --> 57 <FrameLayout 58 android:id="@+id/message_view_subheader" 59 android:layout_width="match_parent" 60 android:layout_height="wrap_content" 61 android:layout_marginLeft="16dip" 62 android:layout_marginRight="16dip" 63 > 64 <include layout="@layout/message_view_subheader" /> 65 </FrameLayout> 66 67 <!-- divider --> 68 <View 69 android:layout_width="match_parent" 70 android:layout_marginLeft="16dip" 71 android:layout_marginRight="16dip" 72 style="@style/message_view_horizontal_divider" 73 /> 74 75 <LinearLayout 76 android:id="@+id/message_tabs_section" 77 android:layout_width="match_parent" 78 android:layout_height="wrap_content" 79 android:layout_marginLeft="16dip" 80 android:layout_marginRight="16dip" 81 android:orientation="vertical" 82 > 83 <Button 84 android:id="@+id/show_pictures" 85 style="?android:attr/borderlessButtonStyle" 86 android:layout_width="wrap_content" 87 android:layout_height="48dip" 88 android:drawableLeft="@drawable/ic_show_images_holo_light" 89 android:drawablePadding="8dip" 90 android:text="@string/message_view_show_pictures_action" 91 android:textAppearance="?android:attr/textAppearanceSmall" 92 /> 93 94 <Button 95 android:id="@+id/always_show_pictures_button" 96 style="?android:attr/borderlessButtonStyle" 97 android:layout_width="wrap_content" 98 android:layout_height="48dip" 99 android:drawableLeft="@drawable/ic_show_images_holo_light" 100 android:drawablePadding="8dip" 101 android:text="@string/message_view_always_show_pictures_prompt" 102 android:textAppearance="?android:attr/textAppearanceSmall" 103 android:visibility="gone" /> 104 105 <LinearLayout 106 android:layout_width="match_parent" 107 android:layout_height="wrap_content" 108 android:orientation="horizontal" 109 > 110 <Button 111 android:id="@+id/show_message" 112 android:text="@string/message_view_show_message_action" 113 android:layout_width="wrap_content" 114 style="@style/message_view_tab" 115 /> 116 <!-- 117 Even though the "invite" section is only for MessageViewFragment, it's managed 118 by MessageViewFragmentBase for simplicity. 119 --> 120 <Button 121 android:id="@+id/show_invite" 122 android:text="@string/message_view_show_invite_action" 123 android:layout_width="wrap_content" 124 style="@style/message_view_tab" 125 /> 126 <Button 127 android:id="@+id/show_attachments" 128 android:layout_width="wrap_content" 129 style="@style/message_view_tab" 130 /> 131 <View 132 android:layout_width="0dip" 133 android:layout_height="0dip" 134 android:layout_weight="1" 135 /> 136 </LinearLayout> 137 <View 138 android:layout_width="match_parent" 139 style="@style/message_view_horizontal_divider" 140 /> 141 </LinearLayout> 142 <!-- end of tab area --> 143 <!-- 144 content area - only one of them is visible at a time. 145 --> 146 <com.android.email.view.RigidWebView 147 android:id="@+id/message_content" 148 android:layout_width="match_parent" 149 android:layout_height="wrap_content" 150 android:layout_marginLeft="16dip" 151 android:layout_marginRight="16dip" 152 android:background="@android:color/white" 153 android:visibility="gone" 154 /> 155 156 <!-- TODO: remove these useless scroll views. They are carry-over 157 from an existing design and are no longer needed. --> 158 <!-- 159 Even though the "invite" section is only for MessageViewFragment, 160 Its visibility is controlled by MessageViewFragmentBase for simplicity. 161 --> 162 <ScrollView 163 android:id="@+id/invite_scroll" 164 android:layout_width="match_parent" 165 android:layout_height="wrap_content" 166 android:layout_marginLeft="16dip" 167 android:layout_marginRight="16dip" 168 android:paddingTop="16dip" 169 android:paddingBottom="16dip" 170 android:visibility="gone" 171 > 172 <!-- 173 Invite section - the views in it are controlled only by MessageViewFragment. 174 MessageViewFragment shouldn't know what's inside it. 175 --> 176 <include layout="@layout/message_view_invitation" /> 177 </ScrollView> 178 <ScrollView 179 android:id="@+id/attachments_scroll" 180 android:layout_width="match_parent" 181 android:layout_height="wrap_content" 182 android:layout_marginLeft="16dip" 183 android:layout_marginRight="16dip" 184 android:visibility="gone" 185 > 186 <LinearLayout 187 android:id="@+id/attachments" 188 android:orientation="vertical" 189 android:layout_width="match_parent" 190 android:layout_height="wrap_content" 191 android:padding="4dip" 192 android:background="@android:color/white" 193 /> 194 </ScrollView> 195 <!-- end of content area --> 196 </LinearLayout> 197 </com.android.email.view.NonLockingScrollView> 198 </FrameLayout> 199