Skip to content

Commit 5901c5f

Browse files
authored
Update README.md
1 parent c17d090 commit 5901c5f

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ SDHtmlTextView use HTMLSpanner to display properly in TextViews an html page, ov
3535
* ``<a href="...">``
3636
* ``<img src="...">``
3737
* ``<table>``
38+
* ``<u>``
39+
* ``<hr/>``
40+
3841

3942
### CSS Tags supported
4043

@@ -58,14 +61,18 @@ SDHtmlTextView use HTMLSpanner to display properly in TextViews an html page, ov
5861
* ``border-color``
5962
* ``border-width``
6063
* ``border``
64+
* ``text-decoration`` only underline and line-through
6165

6266
## Usage
63-
In the xml layout file difine a simple TextView then in the Activity do
67+
In the xml layout file define a simple TextView then in the Activity do
6468

6569
```java
6670
String html=loadStringFromAssetFile(this,"example.html");
6771
TextView tv = (TextView) findViewById(R.id.text);
68-
tv.setText((new HtmlSpanner()).fromHtml(html));
72+
int col=tv.getSolidColor();
73+
HtmlSpanner htmlSpanner=new HtmlSpanner();
74+
htmlSpanner.setBackgroundColor(col);
75+
tv.setText(htmlSpanner.fromHtml(html));
6976
```
7077
If you want to handle href you need to add
7178
```java

0 commit comments

Comments
 (0)