Use highlight span instead of background color span

This commit is contained in:
M66B
2023-11-10 21:13:27 +01:00
parent 5af812dadc
commit 36ee6a1189
4 changed files with 26 additions and 10 deletions

View File

@@ -1272,12 +1272,12 @@ public class StyleHelper {
args.putCharSequence("text", etBody.getText().subSequence(start, end));
new SimpleTask<List<LanguageTool.Suggestion>>() {
private BackgroundColorSpan highlightSpan = null;
private HighlightSpan highlightSpan = null;
@Override
protected void onPreExecute(Bundle args) {
int textColorHighlight = Helper.resolveColor(context, android.R.attr.textColorHighlight);
highlightSpan = new BackgroundColorSpan(textColorHighlight);
highlightSpan = new HighlightSpan(textColorHighlight);
etBody.getText().setSpan(highlightSpan, start, end,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING);
}