0

Example:

.modal-body{}; 
.table{}; 
.class{}; 
<html>
<body><p class= ".modal-body">sample body</p></body>
</html>

I have the above sample text stored in a variable and I want to display it in a textview or webView. Can anyone suggest me the way of doing it? I couldn't find solution I require.

bablu
  • 1
  • 3

1 Answers1

0

You could load html string in a webview On a textView as far as I know you can't since there are native properties used to style text so, there is no point. If you use .fromHtml() there are just a couple of tags available but no css.

javdromero
  • 1,850
  • 2
  • 11
  • 19
  • I have used Webview. But, it is parsing the HTML tags but not the CSS styling. – bablu Jun 30 '21 at 13:45
  • Try [this](https://stackoverflow.com/a/6014762/15298643) . Also as the comment on that answer, using inline css may work too. – javdromero Jun 30 '21 at 13:47