Answer the question
In order to leave comments, you need to log in
Strikethrough text not working, how to fix it??
I show here such text: <h1>КОД1 <s>КОД2</s></h1>
I load in textView:
TextView textView = new TextView(context);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
textView.setText(Html.fromHtml(text, FROM_HTML_SEPARATOR_LINE_BREAK_HEADING));
}else{
textView.setText(Html.fromHtml(text));
}
textView.setLinksClickable(true);
textView.setTextColor(ContextCompat.getColor(context, R.color.post_text));
textView.setMovementMethod(LinkMovementMethod.getInstance());
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question