In android I extract a string from a Json and I want to display it in a textView. The text contains html tags and I use fromHtml() method to use this tags.
The problem is that fromHtml ignores multiple spaces. If the input string looks like this:
*****This is the start of the sentence...
The output is:
*This is the start of the sentence...
*represents one space
If I use str.replace(" ", " "); I'll get the desired white spaces but the words split in textView because is a non-breaking space.
And if I use replace(" ", " "); nothing happens. It will not put multiple white spaces.
How can I keep get multiple white spaces while using fromHtml() method ?