Show html string with inline style attribute in android text view

921 Views Asked by At

I want to show html text with inline style sheet in android text view developed in kotlin with RS. The Html text which i want to show is given below : I have already tried solution given in

Show in textview html with inline styles

but it is not helpful for me.

My html text is like this with inline style attribute

<p class=MsoNormal style='line-height:137%;background:white'> 4x<span  style='font-size:6.0pt;line-height:137%;position:relative;top:-3.5pt'>–1/4</span> is  expressed as</p><img src=\"http://developer.android.com/assets/images/dac_logo.png\">
<p class=MsoNormal style='line-height:137%;background:white'>–4x<span  style='font-size:6.0pt;line-height:137%;position:relative;top:-3.5pt'>1/4</span></p>
<p class=MsoNormal style='line-height:137%;background:white'>x<span  style='font-size:6.0pt;line-height:137%;position:relative;top:-3.5pt'>–1</span></p>
<p class=MsoNormal style='line-height:137%;background:white'>4/x<span  style='font-size:6.0pt;line-height:137%;position:relative;top:-3.5pt'>1/4</span></p>
<p class=MsoNormal style='line-height:137%;background:white'>None of  these</p>

HTML View

4x–1/4 is expressed as

–4x1/4

x–1

4/x1/4

None of these

In text view I have tried html text but instead of

X2 + Y2 = Z2

it is coming like

X2 + Y2 = Z2

1

There are 1 best solutions below

0
On

Either: