Referencing an XML string in an XML Array (Android)

Posted by jax on Stack Overflow See other posts from Stack Overflow or by jax
Published on 2010-05-19T08:14:33Z Indexed on 2010/05/19 12:00 UTC
Read the original article Hit count: 108

Filed under:

in arrays.xml

<string-array name="my_items">
  <item>My item 1</item>
  <item>My item 2</item>
  <item>My item 3</item>
</string-array>

in strings.xml

<resources>
  <string name="item1">My item 1</string>
  <string name="item2">My item 2</string>
  <string name="item3">My item 3</string>
</resources>

I would like to reference the string in the array "My item 1" from strings.xml. How do I do that?

© Stack Overflow or respective owner

Related posts about android