Android :getting using Textview.SetText(characterSequence)
I am getting [OBJ] displayed on the screen when I try to set a ImageSpan on a text View..it shows a /uFFFC unicode character instead of the image on the screen,i.e. a dotted box with OBJ written inside it.
Answers
I faced the same problem, thus I just wanted to have the HTML stripped and just get the String.
The solution is probably not the most beautiful one, but still pretty pragmatical:
public CharSequence stripHtml(String s) { return Html.fromHtml(s).toString().replace('\n', (char) 32) .replace((char) 160, (char) 32).replace((char) 65532, (char) 32).trim(); }
This [OBJ] character seemed to be (char) 65532.
I had to display a very ugly RSS item's (HTML) description field in a TextView without formats. The hypertext contained a lot of WYSIWYG debris like <p></p><p></p>…