summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormindyp <mindyp@google.com>2012-11-06 10:54:05 -0800
committermindyp <mindyp@google.com>2012-11-06 11:03:31 -0800
commitc270a161307eeeee3aac5f5ef91424fbe25ce1e9 (patch)
treedfc59b42c26eef72aea198d18c1658a020c75c6f
parenta1bdcf1af2c39a0d8b0d0fb8f32ea43a70aed17f (diff)
downloadandroid_frameworks_ex-c270a161307eeeee3aac5f5ef91424fbe25ce1e9.tar.gz
android_frameworks_ex-c270a161307eeeee3aac5f5ef91424fbe25ce1e9.tar.bz2
android_frameworks_ex-c270a161307eeeee3aac5f5ef91424fbe25ce1e9.zip
Reset maxlines when the user expands text
To avoid an initial jump when changing over a possibly large numbers of contacts to chips, start with maxlines of 2 from some apps, and eliminate this when the user chooses to expand. Part of b/7481045 recipient address briefly drawn w/o friendly name Change-Id: I5c8cd5c1569befa28a67ddb1f4153e03e896c25a
-rw-r--r--chips/src/com/android/ex/chips/RecipientEditTextView.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index dc73933..9aea16d 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -441,6 +441,9 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements
}
private void expand() {
+ if (mShouldShrink) {
+ setMaxLines(Integer.MAX_VALUE);
+ }
removeMoreChip();
setCursorVisible(true);
Editable text = getText();
@@ -2388,8 +2391,8 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements
if (RecipientEntry.isCreatedRecipient(temp.getEntry().getContactId())
&& getSpannable().getSpanStart(temp) != -1) {
// Replace this.
- final RecipientEntry entry = createValidatedEntry(entries.get(tokenizeAddress(
- temp.getEntry().getDestination()).toLowerCase()));
+ final RecipientEntry entry = createValidatedEntry(entries.get(
+ tokenizeAddress(temp.getEntry().getDestination()).toLowerCase()));
if (entry != null) {
mHandler.post(new Runnable() {
@Override