How set text to TextView as HTM HTML format Android example

Html.fromHtml(), setText(), textView.setText(Html.fromHtml(String htmlFormat)), Android example.

TextView mIdTextOk = (TextView)findViewById(R.id.idTextOk);
int _nOk = 57;
// number 57 will bold style
mIdTextOk.setText(Html.fromHtml( "OK: "+"<b>"+_nOk+"</b>"));
This entry was posted in Android Examples Code and tagged , , . Bookmark the permalink.


Comments are closed.



3,779 views