How to refernce from arrays.xml to strings.xml

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How to refernce from arrays.xml to strings.xml

Postby toko » Thu Feb 18, 2010 7:32 am

lets say I have the following strings.xml

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <resources>
  5.  
  6.    ...
  7.  
  8.    <string name="AAA">aaa</string>
  9.  
  10.    <string name="BBB">bbb</string>
  11.  
  12.    <string name="CCC">ccc</string>
  13.  
  14.    ...
  15.  
  16. </resources>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


Now I want to add new array to my arrays.xml
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <resources>
  4.  
  5.     ...
  6.  
  7.     <array name="newArray">
  8.  
  9.         <item>aaa</item>
  10.  
  11.         <item>bbb</item>
  12.  
  13.         <item>ccc</item>
  14.  
  15.     </array>
  16.  
  17.     ...
  18.  
  19. </resources>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


But instead of write again the values ("aaa", "bbb", etc) in the arrays item tags
I want to use reference from strings.xml, like done in layout XML files
something like (this example doesn't work):

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <array name="newArray">
  2.  
  3.  <item>android:text="@string/AAA"</item>
  4.  
  5.  ...
  6.  
  7. </array>
Parsed in 0.001 seconds, using GeSHi 1.0.8.4



Is this possible?

Thanks,
toko
Freshman
Freshman
 
Posts: 6
Joined: Sun Dec 13, 2009 5:55 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 4 guests