Hello dm1973,

I have also had this problem; unfortunately I have to tell you, that
it is not possible (yet). See:
http://groups.google.com/group/android-developers/browse_thread/thread/da5939b9f8744e6/ea9ee6ec151b281b

You will have to construct the array in code:
int[] array = new int[] { R.drawable.pic1, R.drawable.pict2 };

This makes your drawable references hard-coded; I consider this an
insufficiency in the SDK, maybe you should file an issue. I have
checked all 1.0r1, 1.0r2, 1.1r1.



On Feb 12, 8:13 pm, dm1973 <[email protected]> wrote:
> In arrays.xml I have
>       <arrayname="background_list">
>          <item>@drawable/pict1</item>
>         <item>@drawable/pict2</item>
>     </array>
>
> From code I would like to get an Integerarray.
>
> I have tried
>  int[]array=  c.getResources().getIntArray(id);
>
> but I am gettingarraywith empty items instead of the ids of my
> drawables. Any pointers?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to