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>…


Need Your Help

Move two or more objects randomly around the screen

iphone objective-c ios xcode

I am trying to animate UIImageview to move randomly around the screen. For one UIImageView it is working fine. But for two or more objects it is not working. Can anyone help me?

getting rid of nbsp

html html-entities

Help, Im really sick of using this lots of nbsps in my results page. Im just a beginner. Can you recommend me some techniques so that I will not be copy pasting this lots of nbsp just to get the s...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.