Issue
I have an array in resources:
<integer-array name="my_layouts_array">
<item>@layout/layout1</item>
<item>@layout/layout2</item>
<item>@layout/layout3</item>
...
<item>@layout/layoutn</item>
</integer-array>
Eclipse can move me from this file to selected layout on Ctrl+Click.
When I'm accessing this array from code
getResources().getIntArray(R.array.my_layouts_array);
it returns me an array of size n
, but containing only zeros.
What I am doing wrong here?
Solution
Try using a TypedArray, an xml array designed to hold an array of resource objects, rather than an integer array.
http://developer.android.com/guide/topics/resources/more-resources.html#TypedArray
Answered By - rperryng
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.