diff options
author | Gilles Debunne <debunne@google.com> | 2012-03-30 13:41:31 -0700 |
---|---|---|
committer | Gilles Debunne <debunne@google.com> | 2012-03-30 13:43:37 -0700 |
commit | fc1190b8f143bd00c825d4e52928c577e40e6c49 (patch) | |
tree | 0ca913296a73ef619208d38e448bb14a2b7f29aa | |
parent | 2f595924744830569c195d5ea789b50d7caa9391 (diff) | |
download | frameworks_base-fc1190b8f143bd00c825d4e52928c577e40e6c49.zip frameworks_base-fc1190b8f143bd00c825d4e52928c577e40e6c49.tar.gz frameworks_base-fc1190b8f143bd00c825d4e52928c577e40e6c49.tar.bz2 |
Spans added during a text change are broadcasted
More consistent with the SpanWatcher design.
Change-Id: I3a1e4d92fb422f4cc689dabcdef1473d93fef5ad
-rw-r--r-- | core/java/android/text/SpannableStringBuilder.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/java/android/text/SpannableStringBuilder.java b/core/java/android/text/SpannableStringBuilder.java index b708750..d0c87c6 100644 --- a/core/java/android/text/SpannableStringBuilder.java +++ b/core/java/android/text/SpannableStringBuilder.java @@ -338,7 +338,7 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable en = tbend; if (getSpanStart(spans[i]) < 0) { - setSpan(false, spans[i], + setSpan(true, spans[i], st - tbstart + start, en - tbstart + start, sp.getSpanFlags(spans[i])); @@ -579,8 +579,7 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable mSpanEnds[i] = end; mSpanFlags[i] = flags; - if (send) - sendSpanChanged(what, ostart, oend, nstart, nend); + if (send) sendSpanChanged(what, ostart, oend, nstart, nend); return; } @@ -610,8 +609,7 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable mSpanFlags[mSpanCount] = flags; mSpanCount++; - if (send) - sendSpanAdded(what, nstart, nend); + if (send) sendSpanAdded(what, nstart, nend); } /** |