Link one xml to another xml file in one project

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

Link one xml to another xml file in one project

Postby Serega » Wed Oct 21, 2009 8:32 am

Hi All,

I have XML with arrays in /res/values/arrays.xml in this file i define string array
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.    
  2.  
  3. <string-array name="my_array">
  4.  
  5.         <item>22</item>
  6.  
  7.         <item>1</item>
  8.  
  9.         <item>3</item>
  10.  
  11.         <item>6</item>
  12.  
  13.         <item>20</item>
  14.  
  15.         <item>true</item>
  16.  
  17.     </string-array>
  18.  
  19.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


also I have another XML with animations in res/anim/my_animation.xml, in java code I use array for init my class. My question is next: Can I add one item in my array which will be contain id of my_animation, for get id of generated object via array like
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. String array[] = res.getStringArray(R.array.my_array); array[INDEX_OF_my_animations]
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
, not via R.anim.my_animations?
BEST REGARDS
SEREGA
Serega
Freshman
Freshman
 
Posts: 3
Joined: Mon Oct 19, 2009 8:13 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 7 guests