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:layout_height="wrap_content"
android:visibility="gone" android:visibility="gone"
/> />
<com.android.email.activity.AddressTextView
android:id="@+id/to" android:layout_width="match_parent" <LinearLayout
android:layout_height="wrap_content" android:orientation="horizontal"
android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="match_parent"
android:textColor="?android:attr/textColorSecondary" android:layout_height="wrap_content">
android:layout_marginLeft="6dip" <com.android.email.activity.AddressTextView
android:layout_marginRight="6dip" android:id="@+id/to"
android:inputType="textEmailAddress|textMultiLine" android:layout_width="0dip"
android:imeOptions="actionNext" android:layout_height="wrap_content"
android:hint="@string/message_compose_to_hint" /> 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 <LinearLayout
android:id="@+id/cc_bcc_container" android:id="@+id/cc_bcc_container"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -75,18 +88,30 @@
android:hint="@string/message_compose_bcc_hint" android:hint="@string/message_compose_bcc_hint"
/> />
</LinearLayout> </LinearLayout>
<EditText android:id="@+id/subject" <LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:textAppearance="?android:attr/textAppearanceMedium" android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary" <EditText android:id="@+id/subject"
android:layout_marginLeft="6dip" android:layout_width="0dip"
android:layout_marginRight="6dip" android:layout_height="wrap_content"
android:hint="@string/message_compose_subject_hint" android:layout_weight="1"
android:inputType android:textAppearance="?android:attr/textAppearanceMedium"
="textEmailSubject|textAutoCorrect|textCapSentences|textMultiLine" android:textColor="?android:attr/textColorSecondary"
android:imeOptions="actionNext" 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 Empty container for storing attachments. We'll stick
instances of message_compose_attachment.xml in here. instances of message_compose_attachment.xml in here.

View File

@ -30,16 +30,6 @@
android:showAsAction="ifRoom" android:showAsAction="ifRoom"
android:alphabeticShortcut="d" 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 <item
android:id="@+id/discard" android:id="@+id/discard"
android:title="@string/discard_action" android:title="@string/discard_action"

View File

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