0
    textview.setText(Html.fromHtml("<div style='font-size:15px;width:100px;'><div 
style='float:left;font-weight:bold;width:40%'>Today<br><span style='align:center;padding-
left:5px;font-size:25px;'>12</span></div><div style='float:right;padding-top:1em;width:60%'>     <b>call</b></div></div>"));

html element which is not working properly in android...............

Andro Selva
  • 53,910
  • 52
  • 193
  • 240

2 Answers2

2

In this method required html tag

textView.setText(Html.fromHtml("<h1>hi</h1><p>this is demo</>"));

this will help you show html data in text view

Sumeet kumar
  • 438
  • 2
  • 7
0

This is because, android TextView class supports only a few html tags. You have used few tags which is not supported by the Html class.

See the below link to find out the tags supported by Html class which in turn can be used in TextView.

https://stackoverflow.com/a/3150456/603744

In order to support more html tags, you might have to consider using a WebView instead.

Community
  • 1
  • 1
Andro Selva
  • 53,910
  • 52
  • 193
  • 240