/ Android

Reading styled data from String.xml - Android

<string name="my_text"> <![CDATA[ <b>Autor:</b>Prashanth Madi<br/> <b>Contact:</b>prm0080@gmail.com<br/> <i>Copyright © 2012-2013 </i> ]]></string> 

From our Java code we could now utilize it like this:

TextView tv = (TextView);
findViewById(R.id.myTextView);tv.setText(Html.fromHtml(getString(R.string.my_text)));
Prashanth Madi

Prashanth Madi

I'm a programmer & Tech enthusiast. I work for Big Data Support Team at Microsoft, but this blog, its content & opinions are my own. I blog about tech, gadgets, code, where we're going & we've been.

Read More