Two more comments:

1. You CAN use this mechanism with strings (which you probably know
already) - but ONLY with strings.

2. If you want to acquire ALL drawable resource ids programatically,
watch here:
http://www.anddev.org/tinytut_-_getting_all_drawableids_or_stringids_-t575.html



On Mar 2, 4:17 pm, Chronos <[email protected]> wrote:
> 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/threa...
>
> 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