Move the more-or-less button if needed.

For Exchange contacts, the more-or-less button for the address field would
overlap the delete button, making it impossible to specify a country.  This
changes that logic to shunt down the move-or-less button if delete is present.

Bug 4195633.

Change-Id: I52c5be56ed51baa010026b710815f0fbfdbd9ebf
diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index 3187eaa..9a44cce 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -102,9 +102,14 @@
         int r1 = getMeasuredWidth() - getPaddingRight();
 
         if ((mMoreOrLess != null)) {
+            // Ensure that the more-or-less button does not overlap the delete button.
+            int moreOrLessTop = t1;
+            if (getDelete() != null) {
+                moreOrLessTop = getDelete().getBottom() + getPaddingTop();
+            }
             mMoreOrLess.layout(
-                    r1 - mMoreOrLess.getMeasuredWidth(), t1,
-                    r1, t1 + mMoreOrLess.getMeasuredHeight());
+                    r1 - mMoreOrLess.getMeasuredWidth(), moreOrLessTop,
+                    r1, moreOrLessTop + mMoreOrLess.getMeasuredHeight());
         }
 
         // Subtract buttons if necessary