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