[英]How to add a string in string.xml using Java code, in Android?
[英]How to add a long text with many paragraphs in string.xml in android
當我在之間添加許多段落時
<string name="bbb"> ...... </string>
它向我顯示了以下錯誤。
[2014-12-22 14:54:55 - Inspiration] Her father rescued her from the heartless husband and she was back her to the
[2014-12-22 14:54:55 - Inspiration] G:\adt-bundle-windows-x86_64-20140702\workspace\Inspiration\res\layout\activity_women.xml:11: error: Error: No resource found that matches the given name (at 'text' with value '@string/Women1').
試試這個
<string name="Your string name" > This is your string.
This is the second line of your string.\n\n Third line of your string.</string>
這將導致TextView上的以下內容:
This is your string.
This is the second line of your string.
Third line of your string.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.