Contact editor RTL rendering fixes
Force LTR on an AggregationSuggestionView when the data being surfaced is
a phone number.
Don't allow full screen editing in landscape mode.
Bug: 30152819
Change-Id: I810ada236ce5f75b9923159bbfe3f1d5fd4f5faf
diff --git a/src/com/android/contacts/editor/AggregationSuggestionView.java b/src/com/android/contacts/editor/AggregationSuggestionView.java
index e3bab7e..5a3da00 100644
--- a/src/com/android/contacts/editor/AggregationSuggestionView.java
+++ b/src/com/android/contacts/editor/AggregationSuggestionView.java
@@ -22,6 +22,7 @@
import android.provider.ContactsContract.Contacts;
import android.text.TextUtils;
import android.util.AttributeSet;
+import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -104,6 +105,8 @@
dataText = suggestion.emailAddress;
} else if (suggestion.phoneNumber != null) {
dataText = suggestion.phoneNumber;
+ // Phone numbers should always be in LTR mode.
+ data.setTextDirection(View.TEXT_DIRECTION_LTR);
}
data.setText(dataText);
}
diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index f705819..df201e1 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -244,7 +244,7 @@
// Show the "next" button in IME to navigate between text fields
// TODO: Still need to properly navigate to/from sections without text fields,
// See Bug: 5713510
- fieldView.setImeOptions(EditorInfo.IME_ACTION_NEXT);
+ fieldView.setImeOptions(EditorInfo.IME_ACTION_NEXT | EditorInfo.IME_FLAG_NO_FULLSCREEN);
// Read current value from state
final String column = field.column;