diff options
author | Kevin Lin <linkevin@google.com> | 2014-02-03 17:35:29 -0800 |
---|---|---|
committer | Kevin Lin <linkevin@google.com> | 2014-02-03 17:35:38 -0800 |
commit | a75fa12d54e386392adc0d4b54284a89ec191347 (patch) | |
tree | f4cca0fd996bd0f217afe13ee041d99b86c9bc28 | |
parent | a3daacb24a430bc3fad7251ef962d7c7b6c47e55 (diff) | |
download | android_frameworks_ex-a75fa12d54e386392adc0d4b54284a89ec191347.tar.gz android_frameworks_ex-a75fa12d54e386392adc0d4b54284a89ec191347.tar.bz2 android_frameworks_ex-a75fa12d54e386392adc0d4b54284a89ec191347.zip |
Fix chips library bugs related to setting the threshold to 1.
- Dropdown not being dismissed after having at least one chip and typing a character and deleting it.
- Selecting a chip, deleting it by pressing backspace, and entering another character brings the deleted chip back.
TESTED=chips on bigtop app
Change-Id: I09233ffa7dfe1f64ae9efe4a392fa84b64b8b10a
-rw-r--r-- | chips/src/com/android/ex/chips/RecipientEditTextView.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java index c2d68d2..448de5a 100644 --- a/chips/src/com/android/ex/chips/RecipientEditTextView.java +++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java @@ -1431,9 +1431,11 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements Spannable span = getSpannable(); DrawableRecipientChip[] chips = span.getSpans(start, end, DrawableRecipientChip.class); if (chips != null && chips.length > 0) { + dismissDropDown(); return; } } else if (isCompletedToken) { + dismissDropDown(); return; } super.performFiltering(text, keyCode); @@ -2293,6 +2295,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements if (mMoreChip != null) { spannable.removeSpan(mMoreChip); } + clearSelectedChip(); return; } // Get whether there are any recipients pending addition to the |