android - TextView does not display < symbol -


textview not display < symbol.

how can make does?

html encoding

try htmlencode() android.text.textutils

textutils.htmlencode("my string <"); 

htmldecoding

to decode html encoded strings use fromhtml(htmlencodedstring) android.text.html

html.fromhtml(htmlencodedstring).tostring(); 

[edit] asked how must proceed after retrieving textview id resource xml. set text that:

textview t=(textview)findviewbyid(r.id.textview); t.settext(textutils.htmlencode("my html encoded string <")); 

don't forget import android.text.textutils first!


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -