Hi All,
I have some images in my res/drawable folder. Let's say img1.png,
img2.png and img3.png
I am currently creating an int array of these image IDs in Java like
this -
int[] imgIds = {R.drawable.img1, R.drawable.img2, R.drawable.img3};
Instead is it possible to create an int arr in one of
On 18 March 2011 02:20, droid-stricken harik...@gmail.com wrote:
Hi All,
I have some images in my res/drawable folder. Let's say img1.png,
img2.png and img3.png
I am currently creating an int array of these image IDs in Java like
this -
int[] imgIds = {R.drawable.img1, R.drawable.img2,
You're almost there, but values should be retrieved a little
differently, not with getIntArray:
Resources res = getResources();
TypedArray arr =
res.obtainTypedArray(R.array.your_array_id_here);
Drawable d = arr.getDrawable(2);
-- Kostya
18.03.2011 19:32, Marcin
3 matches
Mail list logo