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

前端 未结 8 983
感情败类
感情败类 2021-01-31 13:25

So, in my strings.xml I have a very long text which I want to format somehow. How can I put a tab before the first sentence of the text? Also, what is the code for new line? Tha

8条回答
  •  离开以前
    2021-01-31 13:42

    You can use \n for new line and \t for tabs. Also, extra spaces/tabs are just copied the way you write them in Strings.xml so just give a couple of spaces where ever you want them.

    A better way to reach this would probably be using padding/margin in your view xml and splitting up your long text in different strings in your string.xml

提交回复
热议问题