android - highlight a certain word in a TextView -


do know how highlight word in textview?

with highligt mean use italic typeface word "hua hin" in following string.

the sandy beaches of hua hin, popular resort town in thailand.

must use textview in textview acomplish this?

i set text in onpostexecute-method of asynctask:

protected void onpostexecute(bitmap[] bitmap) {      (int = 0; < nmbrofimages; i++) {        imageview[i].setimagebitmap(bitmap[i]);        textview[i].settext(scrolltext[i]);        textview[i].setvisibility(textview.visible);     }     loadalertdialog();  } 

i have text in xml-file

if italic want can go

textview[i].settext(html.fromhtml(<i>some part</i> other text); 

else can go spnnable

here example in answer.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -