I use tag in android textview like this
resultTextView.setText(Html.fromHtml(\"T
If you need only different size, you can use simple <small>
or <big>
and you can use it more times for one char.
Example: "clasic text is ok, but <big>
bigger <big>
is <big>
better</big></big></big>
" You can use <h1>
etc. too, but here is problem with margins.
Try this one,Its working for me,use small,big key words
TextView mBox = (TextView) findViewById(R.id.txt);
mBox.setText(Html.fromHtml("<font color=#cc0029>" + "<b>"
+ "Hiiiiiiiiii" + "</b>" + "<br />" + "<small>" + "description"
+ "</small>" + "<br />" + "<small>" + "DateAdded" + "</small>"));
There is exact question Using size HTML attribute in TextView
. It says it ignores the size. You can use use <small>
for smaller text and so on. <font>
only supports color and face attributes. see android.text.Html (on GrepCode) and
How to apply font size while rendering HTML code in Android or Java and TextView with different textSize for more.
Hope it helps in someway.