replicant-packages_apps_Email/res/layout-sw600dp/message_view_fragment.xml
Ben Komalo f872876699 DO NOT MERGE - Fix some issues with 7" layouts.
- Use new recommended sw600dp instead of w600dp to avoid having the
"personality" change on configuration change
- remove the use of xlarge/large for specializing values since the
framework team discourages any use of the buckets (and have also changed
the ordering so that they take lower priority)

Change-Id: Ia6943af9207471b801ce79435ffe9d730b6786b7
2011-05-20 19:08:13 -07:00

396 lines
18 KiB
XML

<?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.
-->
<!-- tablet -->
<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="48dip"
android:layout_alignParentTop="true"
android:layout_marginTop="0dip"
android:layout_marginLeft="32dip"
android:layout_marginRight="32dip"
android:gravity="center_vertical"
style="@style/message_view_subject"
/>
<View
android:id="@+id/subject_divider"
android:layout_marginBottom="16dip"
android:layout_below="@id/subject"
android:layout_width="match_parent"
android:layout_marginLeft="16dip"
android:layout_marginRight="16dip"
style="@style/message_view_horizontal_divider"
/>
<!-- Badge -->
<ImageButton
android:id="@+id/badge"
android:layout_width="64dip"
android:layout_height="64dip"
android:layout_below="@id/subject_divider"
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_divider"
android:layout_toRightOf="@id/badge"
android:layout_alignRight="@id/subject"
android:background="@drawable/message_header_bg"
/>
<!--
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_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:layout_marginRight="16dip"
android:src="@drawable/btn_star_off_normal_email_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_alignTop="@id/header_background"
android:layout_alignBottom="@id/header_background"
android:layout_alignLeft="@id/header_background"
android:layout_toLeftOf="@id/forward_reply_buttons"
android:orientation="vertical"
android:gravity="center_vertical"
>
<LinearLayout
android:id="@+id/presence_from_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center|center_vertical"
>
<!-- Presence icon -->
<ImageView
android:id="@+id/presence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginLeft="8dip"
android:layout_marginRight="8dip"
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:textSize="18dip"
android:textColor="@color/text_primary_color"
android:textStyle="bold"
android:singleLine="true"
android:ellipsize="end"
/>
</LinearLayout>
<!-- From address -->
<TextView
android:id="@+id/from_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dip"
android:layout_marginLeft="40dip"
android:textSize="14dip"
android:textColor="@color/text_secondary_color"
android:singleLine="true"
android:ellipsize="end"
/>
</LinearLayout>
<!-- Addresses, timestamp -->
<Button
android:id="@+id/show_details"
android:layout_width="wrap_content"
android:layout_height="48dip"
android:layout_below="@id/header_background"
android:layout_alignRight="@id/header_background"
android:layout_marginRight="14dip"
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="48dip"
android:layout_below="@id/header_background"
android:layout_alignRight="@id/header_background"
android:layout_toLeftOf="@id/show_details"
android:layout_marginRight="156dip"
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="48dip"
android:layout_below="@id/header_background"
android:layout_alignLeft="@id/badge"
android:layout_toLeftOf="@id/datetime"
android:layout_marginRight="16dip"
android:layout_marginLeft="14dip"
android:gravity="center_vertical"
android:textSize="14dip"
android:textColor="@color/text_ternary_color"
android:singleLine="true"
android:ellipsize="end"
/>
<View
android:id="@+id/address_divider"
android:layout_width="0dip"
android:layout_below="@id/show_details"
android:layout_alignLeft="@id/badge"
android:layout_alignRight="@id/header_background"
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/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:layout_marginLeft="14dip"
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="right"
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:drawableRight="@drawable/ic_show_images_holo_light"
android:drawablePadding="8dip"
/>
<View
android:layout_width="16dip"
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:layout_marginLeft="14dip"
android:layout_marginRight="14dip"
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:layout_marginLeft="14dip"
android:layout_marginRight="14dip"
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:layout_marginLeft="14dip"
android:layout_marginRight="14dip"
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>