This question already has an answer here:
- Storing R.drawable IDs in XML array 4 answers
Is there a way to define an array in XML in which the elements are resource references? For example (it doesn't work, but it explains what I want):
<integer-array name="actions_images">
<item>@drawable/pencil</item>
<item>@drawable/pencil</item>
<item>@drawable/pencil</item>
<item>@drawable/pencil</item>
<item>@drawable/pencil</item>
<item>@drawable/pencil</item>
</integer-array>
If I understand your question correctly, I think I know a workaround (since accessing them via getResources().getIntArray() doesn't work). (You can read more here, that is the source I took the workaround from.)