title: How to preserve line breaks in xml <string> resources in Android?
body: <p>I'm trying to use multi-line  constants (defined in .xml file under /res/values/ folder), but it seems it's impossible to preserve line breaks there - they all being converted in spaces. I've tried to play with "formatted" attribute of strings (setting it both to "true" and "false", also I've tried wrapping strings in CDATA tags, like this:</p>
  
  <pre><code>&lt;string name="str1"&gt;
  A
  B
  C
  &lt;/string&gt;
  
  &lt;string name="str2" formatted="true"&gt;
  A
  B
  C
  &lt;/string&gt;
  
  &lt;string name="str3" formatted="false"&gt;
  A
  B
  C
  &lt;/string&gt;
  
  &lt;string name="str4"&gt;&lt;![CDATA[
  A
  B
  C
  ]]&gt;&lt;/string&gt;
  
  &lt;string name="str5" formatted="true"&gt;&lt;![CDATA[
  A
  B
  C
  ]]&gt;&lt;/string&gt;
  
  &lt;string name="str6" formatted="false"&gt;&lt;![CDATA[
  A
  B
  C
  ]]&gt;&lt;/string&gt;
  </code></pre>
  
  <p>All these string declaration variants produce identical results - five-character string "A B C" (line breaks replaced by single space). Is there any way to avoid this?</p>
  
  <p>P.S. I understand that I can use "\n" to insert line breaks, but anyway resulting string will contain spaces in place of actual line-breaks; i.e., following declaration:</p>
  
  <pre><code>&lt;string name="str1"&gt;
  A\n
  B\n
  C\n
  &lt;/string&gt;
  </code></pre>
  
  <p>results in string "A\n B\n C\n" (every manually inserted line break followed by annoying space). Is there any workaround?..</p>