Small iprovement

This commit is contained in:
M66B 2020-05-03 14:37:33 +02:00
parent 094769f09d
commit d2327052d4
1 changed files with 5 additions and 5 deletions

View File

@ -87,17 +87,17 @@ public class EditTextCompose extends FixedEditText {
SpannableStringBuilder ssb = new SpannableStringBuilder(paste);
QuoteSpan[] spans = ssb.getSpans(0, ssb.length(), QuoteSpan.class);
for (QuoteSpan quoteSpan : spans) {
for (QuoteSpan span : spans) {
QuoteSpan q;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P)
q = new QuoteSpan(colorPrimary);
else
q = new QuoteSpan(colorPrimary, dp3, dp6);
ssb.setSpan(q,
ssb.getSpanStart(quoteSpan),
ssb.getSpanEnd(quoteSpan),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
ssb.removeSpan(quoteSpan);
ssb.getSpanStart(span),
ssb.getSpanEnd(span),
ssb.getSpanFlags(span));
ssb.removeSpan(span);
}
int start = getSelectionStart();