Are "strings.xml" string arrays always parsed/deserialized in the same order?
- by PhilaPhan80
Can I count on string arrays within the "strings.xml" resource file to be parsed/deserialized in the same order every time?
If anyone can cite any documentation that clearly spells out this guarantee, I'd appreciate it. Or, at the very least, offer a significant amount of experience with this topic.
Also, is this a best practice or am I missing a simpler solution?
Note: This will be a small list, so I'm not looking to implement a more complicated database or custom XML solution unless I absolutely have to.
<!--KEYS (ALWAYS CORRESPONDS TO LIST BELOW ??)-->
<string-array name="keys">
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<!--VALUES (ALWAYS CORRESPONDS TO LIST ABOVE ??)-->
<string-array name="values">
<item>one</item>
<item>two</item>
<item>three</item>
</string-array>