This is in relation to a previous question I asked here. Calling replaceAll("\n", "<br />")
and then Html.fromHtml()
will properly format the text in pre-Ice Cream Sandwich; however, as you can see from the photo it does not work in ICS. I've tried at least thirty different ways to capture and replace the line breaks in the text, but I come up empty handed. Is there something in particular I need to call in ICS, is this a bug, has anyone else experienced this problem? Can anyone think of a work around, because there's got to be one. Also, can anyone offer some insight as to why this may be happening? It's very peculiar.
To be clear: I've tested this on Froyo and Gingerbread and the text formatted properly. In Ice Cream Sandwich, it does not.
Here's an example of the text being returned from Last.fm. Scroll to the bottom, it starts at "content". Bon Iver URL
Here's a demo app if you're interested in testing it first hand. http://dl.dropbox.com/u/2301775/lastfm-api-test.zip
Here are two screenshots illustrating what I mean. They are from the test app. The first running Gingerbread and the second running Ice Cream Sandwich.
elements & finally passing it to a `TextView` using `Html.fromHtml`. What ICS device are you using? – Jens Feb 07 '12 at 13:54