Update message compose to phone spec
- move cc/attachment to overflow menu - misc layout fixes Bug: 5011868 Change-Id: If17a36c9e7f13115828a957163af5969b6f8f93e
This commit is contained in:
parent
23b4ce58d4
commit
776997e62e
|
@ -21,7 +21,6 @@
|
|||
android:orientation="vertical" android:background="#ffffff">
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="0dip" android:layout_weight="1"
|
||||
android:scrollbarStyle="outsideInset"
|
||||
android:fillViewport="true">
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
|
@ -36,25 +35,13 @@
|
|||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
<include android:id="@+id/to"
|
||||
layout="@layout/address_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip">
|
||||
android:layout_marginRight="6dip" />
|
||||
|
||||
<include android:id="@+id/to"
|
||||
layout="@layout/address_text_view"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/add_cc_bcc"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/ic_menu_cc_holo_light" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/cc_bcc_container"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -66,37 +53,27 @@
|
|||
>
|
||||
<include android:id="@+id/cc"
|
||||
layout="@layout/address_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<include android:id="@+id/bcc"
|
||||
layout="@layout/address_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText android:id="@+id/subject"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:hint="@string/message_compose_subject_hint"
|
||||
android:inputType
|
||||
="textEmailSubject|textAutoCorrect|textCapSentences|textMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/add_attachment"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/ic_attachment_holo_light" />
|
||||
</LinearLayout>
|
||||
<EditText android:id="@+id/subject"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:hint="@string/message_compose_subject_hint"
|
||||
android:inputType
|
||||
="textEmailSubject|textAutoCorrect|textCapSentences|textMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
/>
|
||||
|
||||
<!--
|
||||
Empty container for storing attachments. We'll stick
|
||||
instances of message_compose_attachment.xml in here.
|
||||
|
|
|
@ -17,28 +17,32 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/send"
|
||||
android:orderInCategory="1000"
|
||||
android:title="@string/send_action"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:icon="@drawable/ic_menu_send_holo_light"
|
||||
android:alphabeticShortcut="s"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/add_cc_bcc"
|
||||
android:title="@string/add_cc_bcc_menu"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/add_attachment"
|
||||
android:title="@string/add_attachment_menu"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/save"
|
||||
android:orderInCategory="1100"
|
||||
android:title="@string/save_draft_action"
|
||||
android:alphabeticShortcut="d"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/discard"
|
||||
android:orderInCategory="1200"
|
||||
android:title="@string/discard_action"
|
||||
android:icon="@drawable/ic_menu_trash_holo_light"
|
||||
android:alphabeticShortcut="q"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/show_quick_text_list_dialog"
|
||||
android:orderInCategory="1300"
|
||||
android:title="@string/show_quick_text_list_dialog_action"
|
||||
android:alphabeticShortcut="r"
|
||||
/>
|
||||
|
|
|
@ -136,8 +136,12 @@
|
|||
<string name="mark_as_unread_action">Mark as unread</string>
|
||||
<!-- Menu item for moving messages to folders [CHAR LIMIT=10] -->
|
||||
<string name="move_action">Move</string>
|
||||
<!-- Menu item / button label for adding CC/BCC fields on message compose. [CHAR LIMIT=16] -->
|
||||
<!-- Button label for adding CC/BCC fields on message compose. [CHAR LIMIT=16] -->
|
||||
<string name="add_cc_bcc_action">+ Cc/Bcc</string>
|
||||
<!-- Menu item label for adding CC/BCC fields on message compose. [CHAR LIMIT=20] -->
|
||||
<string name="add_cc_bcc_menu">Add Cc/Bcc</string>
|
||||
<!-- Menu item label for adding an attachment on message compose. [CHAR LIMIT=20] -->
|
||||
<string name="add_attachment_menu">Attach file</string>
|
||||
<!-- Generic button [CHAR LIMIT=16] -->
|
||||
<string name="close_action">Close</string>
|
||||
<!-- Command shown on Outbox to send all pending messages [CHAR LIMIT=20] -->
|
||||
|
|
|
@ -672,11 +672,17 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
|
|||
mBccView.setTokenizer(new Rfc822Tokenizer());
|
||||
mBccView.setValidator(addressValidator);
|
||||
|
||||
final View addCcBccView = UiUtilities.getView(this, R.id.add_cc_bcc);
|
||||
addCcBccView.setOnClickListener(this);
|
||||
final View addCcBccView = UiUtilities.getViewOrNull(this, R.id.add_cc_bcc);
|
||||
if (addCcBccView != null) {
|
||||
// Tablet view.
|
||||
addCcBccView.setOnClickListener(this);
|
||||
}
|
||||
|
||||
final View addAttachmentView = UiUtilities.getView(this, R.id.add_attachment);
|
||||
addAttachmentView.setOnClickListener(this);
|
||||
final View addAttachmentView = UiUtilities.getViewOrNull(this, R.id.add_attachment);
|
||||
if (addAttachmentView != null) {
|
||||
// Tablet view.
|
||||
addAttachmentView.setOnClickListener(this);
|
||||
}
|
||||
|
||||
setFocusShifter(R.id.to_label, R.id.to);
|
||||
setFocusShifter(R.id.cc_label, R.id.cc);
|
||||
|
|
Loading…
Reference in New Issue