replicant-packages_apps_Email/res/layout/message_view_fragment.xml
Makoto Onuki 96332096ca Fix message view for phone
- All layouts are still temporary, but at least they're usable now.
- Removed reply/forward button from the bottom panel.
  There're buttons in the layout.
- Switched to getView().
- removed the unnecessary LinearLayout from the xlarge layout.
- removed some backgrounds that'll probably not be used.

Change-Id: I3aa27c63ab139ae30e5714ac3d9a1eadce74b0e8
2011-04-05 19:20:41 -07:00

280 lines
11 KiB
XML

<?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
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.
-->
<!-- small -->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff"
>
<ProgressBar
android:id="@+id/loading_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="?android:attr/progressBarStyleLarge"
/>
<LinearLayout
android:id="@+id/main_panel"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!-- header area -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="3dip"
android:paddingBottom="3dip"
android:paddingLeft="3dip"
android:paddingRight="6dip"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="true"
>
<ImageView
android:id="@+id/badge"
android:layout_width="48dip"
android:layout_height="48dip"
android:layout_gravity="center_vertical"
android:layout_marginRight="8dip"
android:layout_marginLeft="2dip"
/>
<ImageView
android:id="@+id/presence"
android:src="@android:drawable/presence_offline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dip"
android:layout_gravity="center_vertical"
/>
<TextView
android:id="@+id/from_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_alignParentLeft="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
android:textColor="?android:attr/textColorPrimary"
android:singleLine="true"
android:ellipsize="end"
android:paddingRight="6dip"
/>
<TextView
android:id="@+id/from_address"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:layout_alignParentLeft="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="normal"
android:textColor="?android:attr/textColorPrimary"
android:singleLine="true"
android:ellipsize="end"
android:paddingRight="6dip"
/>
<!-- 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/reply_all"
android:src="@drawable/reply_all"
android:layout_width="32dip"
android:layout_height="24dip"
android:layout_margin="6dip"
android:baselineAlignBottom="true"
android:visibility="gone"
/>
<ImageView
android:id="@+id/forward"
android:src="@drawable/forward"
android:layout_width="32dip"
android:layout_height="24dip"
android:layout_margin="6dip"
android:baselineAlignBottom="true"
android:visibility="gone"
/>
<TextView
android:id="@+id/datetime"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dip"
android:singleLine="true"
/>
</LinearLayout>
<!-- To, Cc, Bcc addresses -->
<TextView
android:id="@+id/addresses"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/subject"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"
android:textStyle="bold"
android:layout_width="0dip"
android:layout_weight="1.0"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="end"
/>
<!-- TODO: Move this to wherever it really belongs -->
<ImageView
android:id="@+id/favorite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:src="@drawable/btn_star_off_normal_email_holo_light"
/>
<!-- TODO Just to prevent NPE - Phone UI is TBD -->
<Button
android:id="@+id/show_details"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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"
/>
</LinearLayout>
</LinearLayout>
<!-- end of header area -->
<!-- tab area -->
<LinearLayout
android:id="@+id/message_tabs_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:paddingTop="6dip"
android:paddingBottom="6dip"
>
<Button
android:id="@+id/show_message"
android:text="@string/message_view_show_message_action"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<!--
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_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/show_attachments"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<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_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
<!-- end of tab area -->
<!--
content area - only one of them is visible at a time.
-->
<WebView
android:id="@+id/message_content"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:background="#ffffff"
android:visibility="gone"
/>
<!--
Even though the "invite" section is only for MessageViewFragment,
Its visibility is controlled by MessageViewFragmentBase for simplicity.
-->
<ScrollView
android:id="@+id/invite_scroll"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
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="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:padding="4dip"
android:background="#ffffff"
/>
</ScrollView>
<!-- end of content area -->
</LinearLayout>
</FrameLayout>