diff --git a/res/layout-xlarge/message_compose.xml b/res/layout-xlarge/message_compose.xml index a4ce1c860..e6cfe0463 100644 --- a/res/layout-xlarge/message_compose.xml +++ b/res/layout-xlarge/message_compose.xml @@ -22,7 +22,7 @@ android:layout_width="match_parent" > @@ -92,6 +94,7 @@ style="@style/message_compose_header_field_container" > @@ -108,6 +111,7 @@ style="@style/message_compose_header_field_container" > @@ -125,6 +129,7 @@ style="@style/message_compose_header_field_container" > @@ -214,16 +219,20 @@ android:id="@+id/message_content" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="32dip" - android:layout_marginBottom="32dip" - android:layout_marginLeft="16dip" - android:layout_marginRight="16dip" + android:layout_marginTop="0dip" + android:layout_marginBottom="0dip" + android:layout_marginLeft="0dip" + android:layout_marginRight="0dip" android:gravity="left|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" /> @@ -283,6 +292,12 @@ android:layout_width="match_parent" android:layout_marginTop="16dip" /> + diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java index 7787b3efb..e738b708b 100644 --- a/src/com/android/email/activity/MessageCompose.java +++ b/src/com/android/email/activity/MessageCompose.java @@ -447,6 +447,19 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus invalidateOptionsMenu(); } + public void setFocusShifter(int fromViewId, final int targetViewId) { + View label = findViewById(fromViewId); + // Labels don't exist on the phone UI, so null check. + if (label != null) { + label.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + findViewById(targetViewId).requestFocus(); + } + }); + } + } + private void initViews() { mActionBar = getActionBar(); mFromView = (TextView)findViewById(R.id.from); @@ -565,6 +578,12 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus findViewById(R.id.add_cc_bcc).setOnClickListener(this); findViewById(R.id.add_attachment).setOnClickListener(this); + setFocusShifter(R.id.to_label, R.id.to); + setFocusShifter(R.id.cc_label, R.id.cc); + setFocusShifter(R.id.bcc_label, R.id.bcc); + setFocusShifter(R.id.subject_label, R.id.subject); + setFocusShifter(R.id.tap_trap, R.id.message_content); + mSubjectView.setOnFocusChangeListener(this); mMessageContentView.setOnFocusChangeListener(this);