diff options
author | mindyp <mindyp@google.com> | 2012-11-06 10:54:05 -0800 |
---|---|---|
committer | mindyp <mindyp@google.com> | 2012-11-06 11:03:31 -0800 |
commit | c270a161307eeeee3aac5f5ef91424fbe25ce1e9 (patch) | |
tree | dfc59b42c26eef72aea198d18c1658a020c75c6f | |
parent | a1bdcf1af2c39a0d8b0d0fb8f32ea43a70aed17f (diff) | |
download | android_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.java | 7 |
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 |