replicant-packages_apps_Email/res/layout-sw600dp/message_compose.xml
Ben Komalo 7a29fb97b1 Misc compose bug fixes.
- empty subjects should still be prepended with "Re:" and "Fwd:" when
replied/forwarded
- the compose body was being vertically centered

Bug: 5008785
Change-Id: I28e4fac8457c4fd18c764daa35d9deea1646474b
2011-07-11 14:07:12 -07:00

289 lines
13 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 -->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
>
<ScrollView
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dip"
style="@style/message_compose_scroll"
android:paddingTop="16dip"
android:paddingBottom="16dip"
android:paddingLeft="32dip"
android:paddingRight="32dip"
android:background="#ffffffff"
android:fillViewport="true"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!-- headers + buttons -->
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<!-- headers: from/to/cc/bcc/subject -->
<LinearLayout
android:orientation="vertical"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
>
<!-- from: -->
<LinearLayout
style="@style/message_compose_header_field_container_no_tray"
>
<TextView
style="@style/message_compose_header_field_label"
android:text="@string/message_compose_from_label"
/>
<TextView
android:id="@+id/from"
style="@style/message_compose_header_field_value"
/>
</LinearLayout>
<!-- to: -->
<LinearLayout
style="@style/message_compose_header_field_container"
>
<TextView
android:id="@+id/to_label"
style="@style/message_compose_header_field_label"
android:text="@string/message_compose_to_label"
/>
<include android:id="@+id/to"
layout="@layout/address_text_view"/>
</LinearLayout>
<LinearLayout
android:id="@+id/cc_bcc_container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
>
<!-- cc: -->
<LinearLayout
style="@style/message_compose_header_field_container"
>
<TextView
android:id="@+id/cc_label"
style="@style/message_compose_header_field_label"
android:text="@string/message_compose_cc_label"
/>
<include android:id="@+id/cc"
layout="@layout/address_text_view"/>
</LinearLayout>
<!-- bcc: -->
<LinearLayout
style="@style/message_compose_header_field_container"
>
<TextView
android:id="@+id/bcc_label"
style="@style/message_compose_header_field_label"
android:text="@string/message_compose_bcc_label"
/>
<include android:id="@+id/bcc"
layout="@layout/address_text_view"/>
</LinearLayout>
</LinearLayout>
<!-- subject -->
<LinearLayout
style="@style/message_compose_header_field_container"
>
<TextView
android:id="@+id/subject_label"
style="@style/message_compose_header_field_label"
android:text="@string/message_compose_subject_label"
/>
<EditText
android:id="@+id/subject"
style="@style/message_compose_header_field_value"
android:inputType
="textEmailSubject|textAutoCorrect|textCapSentences|textImeMultiLine"
android:imeOptions="actionNext"
/>
</LinearLayout>
</LinearLayout> <!-- end of header -->
<!-- Buttons: +cc/bcc, add attachment -->
<RelativeLayout
android:layout_width="@dimen/message_compose_header_button_area_width"
android:layout_height="match_parent"
android:layout_weight="0"
android:paddingLeft="16dip"
android:layout_gravity="bottom"
>
<Button
android:id="@+id/add_cc_bcc"
android:layout_height="48dip"
android:layout_width="wrap_content"
android:layout_marginTop="48dip"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
style="@android:style/Widget.Holo.Button.Borderless"
android:paddingTop="0dip"
android:paddingBottom="0dip"
android:paddingLeft="0dip"
android:paddingRight="0dip"
android:textSize="18dip"
android:textColor="@color/text_primary_color"
android:text="@string/add_cc_bcc_action"
android:gravity="left|center_vertical"
/>
<ImageButton
android:id="@+id/add_attachment"
android:layout_height="48dip"
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
style="@android:style/Widget.Holo.Button.Borderless"
android:paddingTop="0dip"
android:paddingBottom="0dip"
android:paddingLeft="0dip"
android:paddingRight="0dip"
android:gravity="left|center_vertical"
android:src="@drawable/ic_attachment_holo_light"
/>
</RelativeLayout> <!-- end of buttons -->
</LinearLayout> <!-- end of headers+buttons -->
<LinearLayout android:id="@+id/attachment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dip"
android:orientation="vertical"
android:visibility="gone"
>
<View
android:layout_width="match_parent"
android:layout_marginRight="@dimen/message_compose_header_button_area_width"
style="@style/message_compose_horizontal_divider"
/>
<!--
Empty container for storing attachments. We'll stick
instances of message_compose_attachment.xml in here.
-->
<LinearLayout android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="112dip"
android:orientation="vertical"
/>
<View
android:layout_width="match_parent"
android:layout_marginRight="@dimen/message_compose_header_button_area_width"
style="@style/message_compose_horizontal_divider"
/>
</LinearLayout>
<!-- message body -->
<EditText
android:id="@+id/message_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dip"
android:gravity="top"
android:minLines="3"
android:hint="@string/message_compose_body_hint"
android:inputType="textLongMessage|textMultiLine|textAutoCorrect|textCapSentences"
android:imeOptions="actionDone|flagNoEnterAction"
style="@style/PlainEditText"
android:paddingTop="32dip"
android:paddingBottom="32dip"
android:paddingLeft="16dip"
android:paddingRight="16dip"
/>
<!-- quoted text bar -->
<LinearLayout
android:id="@+id/quoted_text_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<View
android:layout_width="match_parent"
style="@style/message_compose_horizontal_divider"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="46dip"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0"
android:layout_marginLeft="16dip"
android:gravity="left|center_vertical"
android:textSize="18dip"
android:textColor="@color/text_secondary_color"
android:text="@string/message_compose_quoted_text_label"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:textSize="18dip"
android:textColor="@color/text_primary_color"
android:text="@string/message_compose_include_quoted_text_checkbox_label"
/>
<CheckBox
android:id="@+id/include_quoted_text"
android:layout_width="48dip"
android:layout_height="match_parent"
android:layout_weight="0"
android:gravity="center"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
style="@style/message_compose_horizontal_divider"
/>
</LinearLayout>
<!--
Quoted text
TODO: Don't put a webview in a scroll view.
-->
<WebView android:id="@+id/quoted_text"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginTop="16dip"
/>
<View
android:id="@+id/tap_trap"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
/>
</LinearLayout>
</ScrollView>
</FrameLayout>