2009-03-04 03:32:22 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!-- Copyright (C) 2008 The Android Open Source Project
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
2010-07-16 22:10:00 +00:00
|
|
|
|
2009-03-04 03:32:22 +00:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2010-07-16 22:10:00 +00:00
|
|
|
|
2009-03-04 03:32:22 +00:00
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
2010-11-17 01:28:59 +00:00
|
|
|
<!-- small -->
|
2011-04-06 00:02:13 +00:00
|
|
|
<FrameLayout
|
2010-07-16 22:10:00 +00:00
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
android:layout_width="match_parent"
|
2010-07-21 21:29:49 +00:00
|
|
|
android:layout_height="match_parent"
|
2011-04-06 00:02:13 +00:00
|
|
|
android:background="#ffffffff"
|
2010-07-16 22:10:00 +00:00
|
|
|
>
|
2011-04-06 00:02:13 +00:00
|
|
|
<ProgressBar
|
|
|
|
android:id="@+id/loading_progress"
|
|
|
|
android:layout_width="wrap_content"
|
2010-10-04 23:00:02 +00:00
|
|
|
android:layout_height="wrap_content"
|
2011-04-06 00:02:13 +00:00
|
|
|
android:layout_gravity="center"
|
|
|
|
style="?android:attr/progressBarStyleLarge"
|
|
|
|
/>
|
2011-06-22 21:55:15 +00:00
|
|
|
<ScrollView
|
2011-04-06 00:02:13 +00:00
|
|
|
android:id="@+id/main_panel"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
>
|
2009-03-04 03:32:22 +00:00
|
|
|
<LinearLayout
|
2011-04-06 00:02:13 +00:00
|
|
|
android:orientation="vertical"
|
2011-06-22 21:55:15 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2011-04-06 00:02:13 +00:00
|
|
|
>
|
2011-06-22 21:55:15 +00:00
|
|
|
<!-- header area -->
|
2011-04-06 00:02:13 +00:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
2009-03-04 03:32:22 +00:00
|
|
|
android:layout_height="wrap_content"
|
2011-06-22 21:55:15 +00:00
|
|
|
android:orientation="vertical"
|
2011-04-06 00:02:13 +00:00
|
|
|
>
|
2011-06-22 21:55:15 +00:00
|
|
|
<!-- Subject. TODO: Move this to the action bar -->
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/subject"
|
|
|
|
android:layout_width="match_parent"
|
2011-06-15 01:06:24 +00:00
|
|
|
android:layout_height="32dip"
|
2011-06-22 21:55:15 +00:00
|
|
|
android:layout_marginLeft="8dip"
|
|
|
|
android:layout_marginRight="8dip"
|
|
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
|
|
android:textColor="?android:attr/textColorSecondary"
|
|
|
|
android:textStyle="bold"
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
android:singleLine="true"
|
|
|
|
android:ellipsize="end"
|
2011-04-06 00:02:13 +00:00
|
|
|
/>
|
2011-06-22 21:55:15 +00:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="48dip"
|
|
|
|
android:baselineAligned="true"
|
|
|
|
android:background="#3cb8e6"
|
|
|
|
android:gravity="center_vertical"
|
2011-06-15 01:06:24 +00:00
|
|
|
>
|
2011-06-22 21:55:15 +00:00
|
|
|
<ImageView
|
|
|
|
android:id="@+id/badge"
|
|
|
|
android:layout_width="48dip"
|
|
|
|
android:layout_height="48dip"
|
|
|
|
/>
|
|
|
|
<View
|
|
|
|
android:layout_width="1dip"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:background="#fff"
|
|
|
|
/>
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/presence"
|
|
|
|
android:src="@android:drawable/presence_offline"
|
2011-06-15 01:06:24 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2011-06-22 21:55:15 +00:00
|
|
|
android:layout_marginRight="2dip"
|
|
|
|
/>
|
|
|
|
<RelativeLayout
|
|
|
|
android:layout_width="0dip"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_weight="1.0"
|
|
|
|
>
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/from_name"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textSize="16dip"
|
|
|
|
android:textColor="#ffffff"
|
|
|
|
android:singleLine="true"
|
|
|
|
android:ellipsize="end"
|
|
|
|
/>
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/from_address"
|
|
|
|
android:layout_below="@+id/from_name"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textSize="14dip"
|
|
|
|
android:textColor="#eeeeee"
|
|
|
|
android:singleLine="true"
|
|
|
|
android:ellipsize="end"
|
|
|
|
/>
|
|
|
|
</RelativeLayout>
|
|
|
|
<!-- Reply/Forward buttons are default gone for MessageFileView -->
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/reply"
|
|
|
|
android:src="@drawable/reply"
|
|
|
|
android:layout_width="32dip"
|
|
|
|
android:layout_height="24dip"
|
|
|
|
android:layout_margin="6dip"
|
|
|
|
android:baselineAlignBottom="true"
|
|
|
|
android:visibility="gone"
|
|
|
|
/>
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/favorite"
|
|
|
|
android:layout_width="32dip"
|
|
|
|
android:layout_height="24dip"
|
|
|
|
android:layout_margin="6dip"
|
|
|
|
android:src="@drawable/btn_star_off_normal_email_holo_light"
|
|
|
|
/>
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<!-- Addresses, timestamp, "show details" -->
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="48dip"
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
>
|
|
|
|
<!-- To, Cc, Bcc addresses -->
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/addresses"
|
|
|
|
android:layout_width="0dip"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_marginLeft="24dip"
|
2011-06-15 01:06:24 +00:00
|
|
|
android:singleLine="true"
|
|
|
|
android:ellipsize="end"
|
2011-06-22 21:55:15 +00:00
|
|
|
style="@style/message_view_text"
|
2011-06-15 01:06:24 +00:00
|
|
|
/>
|
|
|
|
<TextView
|
2011-06-22 21:55:15 +00:00
|
|
|
android:id="@+id/datetime"
|
2011-06-15 01:06:24 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2011-06-22 21:55:15 +00:00
|
|
|
android:layout_marginLeft="16dip"
|
2011-06-15 01:06:24 +00:00
|
|
|
android:singleLine="true"
|
2011-06-22 21:55:15 +00:00
|
|
|
style="@style/message_view_text"
|
2011-06-15 01:06:24 +00:00
|
|
|
/>
|
2011-06-22 21:55:15 +00:00
|
|
|
<!-- Set proper background to reflect selected state -->
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/show_details"
|
|
|
|
android:src="@drawable/ic_menu_expander_minimized_holo_light"
|
|
|
|
android:layout_width="32dip"
|
|
|
|
android:layout_height="32dip"
|
|
|
|
android:layout_marginLeft="4dip"
|
|
|
|
android:layout_marginRight="16dip"
|
|
|
|
android:gravity="center"
|
|
|
|
android:background="?android:attr/selectableItemBackground"
|
|
|
|
/>
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<!-- divider -->
|
|
|
|
<View
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_marginLeft="16dip"
|
|
|
|
android:layout_marginRight="16dip"
|
|
|
|
style="@style/message_view_horizontal_divider"
|
2011-04-06 00:02:13 +00:00
|
|
|
/>
|
2011-06-22 21:55:15 +00:00
|
|
|
|
2011-04-06 00:02:13 +00:00
|
|
|
</LinearLayout>
|
2011-06-22 21:55:15 +00:00
|
|
|
<!-- end of header area -->
|
2011-04-06 00:02:13 +00:00
|
|
|
|
2011-06-22 21:55:15 +00:00
|
|
|
<!--
|
|
|
|
tab area TODO: Need visual spec
|
|
|
|
-->
|
2011-04-06 00:02:13 +00:00
|
|
|
<LinearLayout
|
2011-06-22 21:55:15 +00:00
|
|
|
android:id="@+id/message_tabs_section"
|
2011-04-06 00:02:13 +00:00
|
|
|
android:layout_width="match_parent"
|
2010-10-04 23:00:02 +00:00
|
|
|
android:layout_height="wrap_content"
|
2011-06-22 21:55:15 +00:00
|
|
|
android:layout_marginLeft="16dip"
|
|
|
|
android:layout_marginRight="16dip"
|
|
|
|
android:orientation="vertical"
|
2011-04-06 00:02:13 +00:00
|
|
|
>
|
2011-06-22 21:55:15 +00:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
2011-04-06 00:02:13 +00:00
|
|
|
android:layout_height="wrap_content"
|
2011-06-22 21:55:15 +00:00
|
|
|
android:orientation="horizontal"
|
|
|
|
>
|
|
|
|
<Button
|
|
|
|
android:id="@+id/show_message"
|
|
|
|
android:text="@string/message_view_show_message_action"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
style="@style/message_view_tab"
|
|
|
|
/>
|
|
|
|
<!--
|
|
|
|
Even though the "invite" section is only for MessageViewFragment, it's managed
|
|
|
|
by MessageViewFragmentBase for simplicity.
|
|
|
|
-->
|
|
|
|
<Button
|
|
|
|
android:id="@+id/show_invite"
|
|
|
|
android:text="@string/message_view_show_invite_action"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
style="@style/message_view_tab"
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
android:id="@+id/show_attachments"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
style="@style/message_view_tab"
|
|
|
|
/>
|
|
|
|
<View
|
|
|
|
android:layout_width="0dip"
|
|
|
|
android:layout_height="0dip"
|
|
|
|
android:layout_weight="1"
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
android:id="@+id/show_pictures"
|
|
|
|
android:text="@string/message_view_show_pictures_action"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
style="@style/message_view_tab"
|
|
|
|
/>
|
2011-06-13 17:14:58 +00:00
|
|
|
<RelativeLayout
|
|
|
|
android:id="@+id/always_show_pictures_container"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:visibility="gone"
|
|
|
|
>
|
|
|
|
<Button
|
|
|
|
android:id="@+id/always_show_pictures_button"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_alignParentRight="true"
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
android:text="@string/message_view_always_show_pictures_button" />
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/always_show_pictures_text"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_toLeftOf="@+id/always_show_pictures_button"
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
android:text="@string/message_view_always_show_pictures_prompt" />
|
|
|
|
</RelativeLayout>
|
2011-06-22 21:55:15 +00:00
|
|
|
</LinearLayout>
|
|
|
|
<View
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
style="@style/message_view_horizontal_divider"
|
2011-04-06 00:02:13 +00:00
|
|
|
/>
|
|
|
|
</LinearLayout>
|
2011-06-22 21:55:15 +00:00
|
|
|
<!-- end of tab area -->
|
2011-04-06 00:02:13 +00:00
|
|
|
<!--
|
2011-06-22 21:55:15 +00:00
|
|
|
content area - only one of them is visible at a time.
|
|
|
|
|
|
|
|
TODO Decide what to do with the scrollview+webview issue, and remove the scrollviews
|
|
|
|
below if we go with the outer scrollview.
|
2011-04-06 00:02:13 +00:00
|
|
|
-->
|
2011-06-22 21:55:15 +00:00
|
|
|
<WebView
|
|
|
|
android:id="@+id/message_content"
|
|
|
|
android:layout_width="match_parent"
|
2011-04-06 00:02:13 +00:00
|
|
|
android:layout_height="wrap_content"
|
2011-06-22 21:55:15 +00:00
|
|
|
android:layout_marginLeft="16dip"
|
|
|
|
android:layout_marginRight="16dip"
|
|
|
|
android:background="#ffffff"
|
|
|
|
android:visibility="gone"
|
2011-04-06 00:02:13 +00:00
|
|
|
/>
|
|
|
|
<!--
|
2011-06-22 21:55:15 +00:00
|
|
|
Even though the "invite" section is only for MessageViewFragment,
|
|
|
|
Its visibility is controlled by MessageViewFragmentBase for simplicity.
|
2011-04-06 00:02:13 +00:00
|
|
|
-->
|
2011-06-22 21:55:15 +00:00
|
|
|
<ScrollView
|
|
|
|
android:id="@+id/invite_scroll"
|
2011-04-06 00:02:13 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2011-06-22 21:55:15 +00:00
|
|
|
android:layout_marginLeft="16dip"
|
|
|
|
android:layout_marginRight="16dip"
|
|
|
|
android:visibility="gone"
|
|
|
|
>
|
|
|
|
<!--
|
|
|
|
Invite section - the views in it are controlled only by MessageViewFragment.
|
|
|
|
MessageViewFragment shouldn't know what's inside it.
|
|
|
|
-->
|
|
|
|
<include layout="@layout/message_view_invitation" />
|
|
|
|
</ScrollView>
|
|
|
|
<ScrollView
|
|
|
|
android:id="@+id/attachments_scroll"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginLeft="16dip"
|
|
|
|
android:layout_marginRight="16dip"
|
|
|
|
android:visibility="gone"
|
|
|
|
>
|
|
|
|
<LinearLayout
|
|
|
|
android:id="@+id/attachments"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:padding="4dip"
|
|
|
|
android:background="#ffffff"
|
|
|
|
/>
|
|
|
|
</ScrollView>
|
|
|
|
<!-- end of content area -->
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|
2011-04-06 00:02:13 +00:00
|
|
|
</FrameLayout>
|