Line Break in XML formatting?

后端 未结 5 1007
夕颜
夕颜 2021-01-31 06:56

when editing a String in XML I need to add line breaks. And I wanted to ask what is the RIGHT form when programming for android? Because
works but ECLIPS

5条回答
  •  不知归路
    2021-01-31 07:44

    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: for bold text, for italics, and for underlined text.

    Other formatting options are shown in this article on the Android Developers' site:
    https://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling

提交回复
热议问题