0

in my app i have string (for example) :

String s = "log<small><sub>(log<small><sub>(log<small><sub>3<small><sup>2</sup></small></sub></small>(40))</sub></small>(39!))</sub></small>(40!)".

It's a mathematical expression, as you see. And when i do myTextView.setText(Html.fromHtml(s)) text in TextView incorrect displayed (see on logarithm base 3^2):

incorrect

but in browser this String displayed correct (try it if you want): enter image description here

WHY?

1
  • I think the problem should be somewhere in your xml file...can u post the snippet? Commented Oct 25, 2013 at 19:13

1 Answer 1

1

As i guessed earlier, the problem was in xml file...I copied your text but it shows the error like you said. But, then I changed the layout_width to fill_parent

and it is now fine...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.