How to make a new line or tab in <string> XML (eclipse/android)? How to make a new line or tab in <string> XML (eclipse/android)? xml xml

How to make a new line or tab in <string> XML (eclipse/android)?


Add \t for tab and \n for new line.


Use \n for a line break and \t if you want to insert a tab.

You can also use some XML tags for basic formatting: <b> for bold text, <i> for italics, and <u> for underlined text

More info:

https://developer.android.com/guide/topics/resources/string-resource.html


\n didn't work for me. So I used <br/> HTML tag

<string name="message_register_success">    Sign up is complete. <br/>    Enjoy a new shopping life at fatherofapps.com!!</string>