Hello. From the title itself I think my situation is pretty clear;
In my strings xml file, one of my resources is like this:
<string name="txtTrivia"> <p>... Well, there we were, the three of us, Victor, Leonardo and myself on our way back home after a stroll around the streets, on one cloudy, expectant afternoon. ..</p> <p> Victor, the huge big burly guy and the ever-hungry soul that he always is, felt his stomach growling again. So we stopped by and got this pizza with our combined finances. We took the short cut through the park, in a hurry to reach home and finish the pizza, before it cooled off ... .. </p> <p>Rain! Vindictive, thunderous, blinding rain. As if the heavens have opened up, you know! We ran to take shelter under a tree. It was an old, huge tree. And famous too in the neighbourhood; everybody called it the ‘Wishing Tree’. ... . </p> <p>‘What?’ I asked. ‘yeah, What?’ exclaimed Leo too! A good 2 minutes of silence prevailed all around. ... . ... </p> </string>
Now in my .axml file I have a textview where I want to fetch this text and show it, maintaining the html formatting intact. The id of the control was 'sometext'. Now, in mainActivity, I did this code:
TextView foo = (TextView)FindViewById(Resource.Id.sometext); var Triviatxt = String.Format(Resources.GetString(Resource.String.txtTrivia)); foo.TextFormatted = Html.FromHtml(Triviatxt);
But application is not working as expected. My app gets deployed and immediately after, gives the hung/error alert. See the screenshots here:
Can you tell me how to correct the code for this? Also I want to know what other html tags I can use without problem in my text, other than 'p' tags; because I would like to use a few more to mark my text content as per liking.
Any kind of guidance here will be much appreciated.