0

I have String with ul,li and style tag in it. And I am trying to show them in HTML formatting in textview.

String

    <style type='text/css'> 
ul
{
     list-style-type: circle;
     font-size: 16px;
}

<div style='font-family: Montserrat;line-height: 30px; text-align: left; color: #383838;'> 
<ul>
     <li>
        Hello Everyone <span style='font-weight: 600; color: #b49fe1;'>Good Morning</span> How are You ?.</br>
    </li> 
    <li>
        Good morning <span style='color: #b49fe1;font-weight: 600;'>Have a nice day</span>.</br>
    </li> 
 </ul>

textView.setText(Html.fromHtml(myHtmlText));

But textview shows the plain text.

SomeHow i managed to convert the ul and li tag by using this but didn't look like i want .

Is anyone know How can I have use style,ul and li tag in textview?

Rahul Bh
  • 123
  • 2
  • 15

1 Answers1

0

You are using CSS but CSS is not supported in android. You can use webview instead.

Below tags are supported in android.For more details look here

br
p
div
em
b
strong
cite
dfn
i
big
small
font
blockquote
tt
monospace
a
u
sup
sub
Sultan Mahmud
  • 1,245
  • 8
  • 18