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
Post a Comment