Merge "Expose cc/attachment actions on UI directly"

This commit is contained in:
Ben Komalo 2011-04-28 16:42:33 -07:00 committed by Android (Google) Code Review
commit 688f5355e3
5 changed files with 51 additions and 39 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -35,16 +35,29 @@
android:layout_height="wrap_content"
android:visibility="gone"
/>
<com.android.email.activity.AddressTextView
android:id="@+id/to" 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:inputType="textEmailAddress|textMultiLine"
android:imeOptions="actionNext"
android:hint="@string/message_compose_to_hint" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.android.email.activity.AddressTextView
android:id="@+id/to"
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:inputType="textEmailAddress|textMultiLine"
android:imeOptions="actionNext"
android:hint="@string/message_compose_to_hint" />
<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"
@ -75,18 +88,30 @@
android:hint="@string/message_compose_bcc_hint"
/>
</LinearLayout>
<EditText android:id="@+id/subject"
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_height="wrap_content"
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"
/>
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>
<!--
Empty container for storing attachments. We'll stick
instances of message_compose_attachment.xml in here.

View File

@ -30,16 +30,6 @@
android:showAsAction="ifRoom"
android:alphabeticShortcut="d"
/>
<item
android:id="@+id/add_cc_bcc"
android:title="@string/add_cc_bcc_action"
android:showAsAction="ifRoom"
/>
<item
android:id="@+id/add_attachment"
android:icon="@drawable/ic_attachment_holo_light"
android:showAsAction="ifRoom"
/>
<item
android:id="@+id/discard"
android:title="@string/discard_action"

View File

@ -580,14 +580,11 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
mBccView.setTokenizer(new Rfc822Tokenizer());
mBccView.setValidator(addressValidator);
final View addCcBccView = findViewById(R.id.add_cc_bcc); // xlarge only
if (addCcBccView != null) {
addCcBccView.setOnClickListener(this);
}
final View addAttachmentView = findViewById(R.id.add_attachment); // xlarge only
if (addAttachmentView != null) {
addAttachmentView.setOnClickListener(this);
}
final View addCcBccView = UiUtilities.getView(this, R.id.add_cc_bcc);
addCcBccView.setOnClickListener(this);
final View addAttachmentView = UiUtilities.getView(this, R.id.add_attachment);
addAttachmentView.setOnClickListener(this);
setFocusShifter(R.id.to_label, R.id.to);
setFocusShifter(R.id.cc_label, R.id.cc);