summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJin Cao <jinyan@google.com>2014-08-08 13:27:34 -0700
committerJin Cao <jinyan@google.com>2014-08-08 13:27:34 -0700
commit15f09d77ffd14b53d17b6fb27b921c740f625846 (patch)
tree3f5d50fc489fe57f6fecaa8e1f00f475937a718e
parentf85c63b8dbbd8b16a41aaa4a7e978b05be98b557 (diff)
downloadandroid_packages_apps_UnifiedEmail-15f09d77ffd14b53d17b6fb27b921c740f625846.tar.gz
android_packages_apps_UnifiedEmail-15f09d77ffd14b53d17b6fb27b921c740f625846.tar.bz2
android_packages_apps_UnifiedEmail-15f09d77ffd14b53d17b6fb27b921c740f625846.zip
[Quantum compose] custom anchor for to
Add custom anchor for To field so the popup will have the full width of the field. b/16851158 Change-Id: I54cbd601d46c8d2fb3ee37956fb560dcb31905f9
-rw-r--r--res/layout/compose_recipients.xml27
-rw-r--r--src/com/android/mail/compose/ComposeActivity.java1
2 files changed, 18 insertions, 10 deletions
diff --git a/res/layout/compose_recipients.xml b/res/layout/compose_recipients.xml
index b10337527..b265318f5 100644
--- a/res/layout/compose_recipients.xml
+++ b/res/layout/compose_recipients.xml
@@ -38,17 +38,24 @@
android:text="@string/to"
style="@style/ComposeHeading" />
- <com.android.ex.chips.RecipientEditTextView
- android:id="@+id/to"
- android:contentDescription="@string/to"
- android:dropDownAnchor="@id/to_content"
- style="@style/ToRecipientEditTextViewStyle" />
+ <LinearLayout
+ android:id="@+id/compose_to_dropdown_anchor"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <com.android.ex.chips.RecipientEditTextView
+ android:id="@+id/to"
+ android:contentDescription="@string/to"
+ android:dropDownAnchor="@id/to_content"
+ style="@style/ToRecipientEditTextViewStyle" />
+
+ <ImageView
+ android:id="@+id/add_cc_bcc"
+ android:src="@drawable/ic_expand_more_24dp"
+ android:contentDescription="@string/add_cc_label"
+ style="@style/ComposeFieldButton" />
- <ImageView
- android:id="@+id/add_cc_bcc"
- android:src="@drawable/ic_expand_more_24dp"
- android:contentDescription="@string/add_cc_label"
- style="@style/ComposeFieldButton" />
+ </LinearLayout>
</LinearLayout>
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index cf50fbc87..df90f724a 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -1295,6 +1295,7 @@ public class ComposeActivity extends ActionBarActivity
mAttachmentsView = (AttachmentsView)findViewById(R.id.attachments);
mTo = (RecipientEditTextView) findViewById(R.id.to);
initializeRecipientEditTextView(mTo);
+ mTo.setAlternatePopupAnchor(findViewById(R.id.compose_to_dropdown_anchor));
mCc = (RecipientEditTextView) findViewById(R.id.cc);
initializeRecipientEditTextView(mCc);
mBcc = (RecipientEditTextView) findViewById(R.id.bcc);