0

I am trying to display repeating decimals in a TextView but using the HTML tag in Html.fromHtml is not working. Are there any other ways to display lines over numbers?

1 Answers1

-1

Checkout this:

private static final StrikethroughSpan STRIKE_THROUGH_SPAN = new StrikethroughSpan();
...
tv.setText(s, TextView.BufferType.SPANNABLE);
Spannable spannable = (Spannable) tv.getText();
spannable.setSpan(STRIKE_THROUGH_SPAN, 0, s.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

Source: Is there an easy way to strike through text in an app widget?

Community
  • 1
  • 1
Victor Gomes
  • 128
  • 10