summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVineet Patil <vpatil@cyngn.com>2015-10-26 15:51:20 -0700
committerVineet Patil <vpatil@cyngn.com>2015-10-26 15:51:20 -0700
commita09fcc3dc13df0cba0375471c10141384b904bbc (patch)
tree2f822fb879f13a86e370608290c3856a8d411bba
parent12ebb2d73b8f9344cb2f645691912517eedad6bb (diff)
downloadandroid_frameworks_opt_chips-caf/cm-12.1.tar.gz
android_frameworks_opt_chips-caf/cm-12.1.tar.bz2
android_frameworks_opt_chips-caf/cm-12.1.zip
Fixed bug when the more chip would show negative value.caf/cm-12.1
When the number of recipients were greater than the mMaxChipsParsed (>50) the more chjip would have a negative count whenever the EditTextview looses focus on it. Ticket: QRDL-1068 Change-Id: I4e5f14014d3b846459886dc78448aedcae467c87
-rw-r--r--src/com/android/ex/chips/RecipientEditTextView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java
index de636f9..8449e50 100644
--- a/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/src/com/android/ex/chips/RecipientEditTextView.java
@@ -2196,7 +2196,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements
}
// Now, count total addresses.
start = 0;
- int tokenCount = mPendingChipsCount;
+ int tokenCount = countTokens(text);
MoreImageSpan moreSpan = createMoreSpan(tokenCount - CHIP_LIMIT);
SpannableString chipText = new SpannableString(text.subSequence(end, text.length()));
chipText.setSpan(moreSpan, 0, chipText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);