replicant-packages_apps_Email/res/layout-xlarge/message_view_fragment.xml

394 lines
17 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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
http://www.apache.org/licenses/LICENSE-2.0
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.
-->
<!-- xlarge -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff"
android:orientation="vertical"
>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
>
<ProgressBar
android:id="@+id/loading_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="?android:attr/progressBarStyleLarge"
/>
<RelativeLayout
android:id="@+id/main_panel"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!-- Subject -->
<TextView
android:id="@+id/subject"
android:layout_width="fill_parent"
android:layout_height="40dip"
android:layout_alignParentTop="true"
android:layout_marginTop="0dip"
android:layout_marginLeft="16dip"
android:layout_marginRight="16dip"
android:singleLine="true"
android:ellipsize="end"
android:textSize="18dip"
android:textColor="@color/text_primary_color"
android:textStyle="bold"
android:gravity="left|center_vertical"
/>
<!-- Badge -->
<ImageButton
android:id="@+id/badge"
android:layout_width="64dip"
android:layout_height="64dip"
android:layout_below="@id/subject"
android:layout_alignLeft="@id/subject"
android:padding="0dip"
android:scaleType="fitCenter"
/>
<!-- Background for sender name and buttons -->
<View
android:id="@+id/header_background"
android:layout_width="0dip"
android:layout_height="64dip"
android:layout_below="@id/subject"
android:layout_toRightOf="@id/badge"
android:layout_alignRight="@id/subject"
android:background="@drawable/message_header_bg"
/>
<!-- Fold -->
<ImageView
android:id="@+id/header_background_fold"
android:layout_width="32dip"
android:layout_height="20dip"
android:layout_below="@id/header_background"
android:layout_alignRight="@id/header_background"
android:src="@drawable/message_header_fold"
android:padding="0dip"
/>
<!--
reply, reply-all, forward, Star
These buttons can all be gone at runtime, so don't refer to individual buttons from
other views. Instead refer to this outer layout.
-->
<LinearLayout
android:id="@+id/forward_reply_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:layout_marginLeft="0dip"
android:layout_marginRight="24dip"
android:layout_alignTop="@id/header_background"
android:layout_alignRight="@id/header_background"
android:orientation="horizontal"
>
<ImageButton
android:id="@+id/reply"
android:layout_marginRight="16dip"
android:src="@drawable/ic_reply"
android:visibility="gone"
style="@style/message_view_action_buttons"
/>
<ImageButton
android:id="@+id/reply_all"
android:layout_marginRight="16dip"
android:src="@drawable/ic_reply_all"
android:visibility="gone"
style="@style/message_view_action_buttons"
/>
<ImageButton
android:id="@+id/forward"
android:layout_marginRight="16dip"
android:src="@drawable/ic_forward"
android:visibility="gone"
style="@style/message_view_action_buttons"
/>
<ImageButton
android:id="@+id/favorite"
android:src="@drawable/ic_star_none_holo_light"
android:visibility="gone"
style="@style/message_view_action_buttons"
/>
</LinearLayout>
<!-- presence, sender address, sender name: make them center_vertical -->
<LinearLayout
android:id="@+id/presence_from_name"
android:layout_width="0dip"
android:layout_height="0dip"
android:layout_marginLeft="32dip"
android:layout_marginRight="16dip"
android:layout_alignTop="@id/header_background"
android:layout_alignBottom="@id/header_background"
android:layout_alignLeft="@id/header_background"
android:layout_toLeftOf="@id/forward_reply_buttons"
android:gravity="center_vertical"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/presence_from_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="left|center_vertical"
>
<!-- Presence icon -->
<ImageView
android:id="@+id/presence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:src="@android:drawable/presence_offline"
/>
<!-- Sender display name -->
<TextView
android:id="@+id/from_name"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="4dip"
android:textSize="18dip"
android:textColor="@color/text_primary_color"
android:textStyle="bold"
android:singleLine="true"
android:ellipsize="end"
android:gravity="left|center_vertical"
/>
</LinearLayout>
<!-- From address -->
<TextView
android:id="@+id/from_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dip"
android:textSize="14dip"
android:textColor="@color/text_secondary_color"
android:singleLine="true"
android:ellipsize="end"
android:paddingRight="6dip"
/>
</LinearLayout>
<!-- Addresses, timestamp -->
<Button
android:id="@+id/show_details"
android:layout_width="wrap_content"
android:layout_height="40dip"
android:layout_below="@id/header_background"
android:layout_toLeftOf="@id/header_background_fold"
android:layout_marginRight="16dip"
style="@android:style/Widget.Holo.Button.Borderless"
android:padding="0dip"
android:gravity="center_vertical"
android:text="@string/message_view_show_details"
android:textSize="14dip"
android:textColor="@color/text_ternary_color"
android:textStyle="bold"
android:singleLine="true"
/>
<TextView
android:text="@string/message_view_show_details"
android:id="@+id/datetime"
android:layout_width="wrap_content"
android:layout_height="40dip"
android:layout_below="@id/header_background"
android:layout_toLeftOf="@id/show_details"
android:layout_marginRight="48dip"
android:gravity="center_vertical"
android:textSize="14dip"
android:textColor="@color/text_ternary_color"
android:singleLine="true"
/>
<TextView
android:id="@+id/addresses"
android:layout_width="0dip"
android:layout_height="40dip"
android:layout_below="@id/header_background"
android:layout_alignLeft="@id/badge"
android:layout_toLeftOf="@id/datetime"
android:layout_marginRight="16dip"
android:gravity="center_vertical"
android:textSize="14dip"
android:textColor="@color/text_ternary_color"
android:singleLine="true"
android:ellipsize="end"
/>
<View
android:id="@+id/below_address_divider"
android:layout_width="0dip"
android:layout_below="@id/show_details"
android:layout_alignLeft="@id/addresses"
android:layout_alignRight="@id/show_details"
style="@style/message_view_horizontal_divider"
/>
<!--
The rest: tab + body + command buttons. Use LinearLayout to easily hide part of
them.
-->
<LinearLayout
android:layout_width="0dip"
android:layout_height="0dip"
android:layout_below="@id/below_address_divider"
android:layout_alignLeft="@id/badge"
android:layout_alignRight="@id/header_background"
android:layout_alignParentBottom="true"
android:orientation="vertical"
>
<!-- Tabs + divider -->
<!-- Can't use a RelativeLayout, because tabs can be GONE -->
<LinearLayout
android:id="@+id/message_tabs_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dip"
android:orientation="horizontal"
>
<Button
android:id="@+id/show_message"
android:layout_width="128dip"
android:layout_height="match_parent"
android:layout_gravity="center"
android:text="@string/message_view_show_message_action"
android:textSize="14dip"
android:textColor="@color/text_primary_color"
android:singleLine="true"
android:ellipsize="end"
style="@android:style/Widget.Holo.Light.Tab"
/>
<Button
android:id="@+id/show_invite"
android:layout_width="128dip"
android:layout_height="match_parent"
android:layout_gravity="center"
android:text="@string/message_view_show_invite_action"
android:textSize="14dip"
android:textColor="@color/text_primary_color"
android:singleLine="true"
android:ellipsize="end"
style="@android:style/Widget.Holo.Light.Tab"
/>
<Button
android:id="@+id/show_attachments"
android:layout_width="128dip"
android:layout_height="match_parent"
android:layout_gravity="center"
android:textSize="14dip"
android:textColor="@color/text_primary_color"
android:singleLine="true"
android:ellipsize="end"
style="@android:style/Widget.Holo.Light.Tab"
/>
<!-- filler -->
<View
android:layout_width="0dip"
android:layout_height="0dip"
android:layout_weight="1"
/>
<Button
android:id="@+id/show_pictures"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
style="@android:style/Widget.Holo.Button.Borderless"
android:padding="0dip"
android:text="@string/message_view_show_pictures_action"
android:textSize="14dip"
android:textColor="@color/text_ternary_color"
android:textStyle="bold"
/>
<View
android:layout_width="48dip"
android:layout_height="0dip"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
style="@style/message_view_horizontal_divider"
/>
</LinearLayout>
<!-- margin -->
<View
android:layout_width="0dip"
android:layout_height="16dip"
/>
<!-- content area - only one of them is visible at a time -->
<!-- Message body -->
<WebView
android:id="@+id/message_content"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:background="#ffffffff"
android:visibility="gone"
/>
<!-- Invite: Even though this section is only for MessageViewFragment,
Its visibility is controlled by MessageViewFragmentBase for simplicity.
MessageFileViewFragment shouldn't touch this. -->
<ScrollView
android:id="@+id/invite_scroll"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:visibility="gone"
>
<include layout="@layout/message_view_invitation" />
</ScrollView>
<!-- Attachments -->
<ScrollView
android:id="@+id/attachments_scroll"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:visibility="gone"
>
<LinearLayout
android:id="@+id/attachments"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/message_view_info_back_color"
android:divider="?android:attr/dividerHorizontal"
android:showDividers="beginning|middle|end"
/>
</ScrollView>
</LinearLayout>
</RelativeLayout>
</FrameLayout>
</LinearLayout>