I have an integer array in an xml file as follows
- @drawable/pic1
- @drawabl
Just make it a normal resource array. You could do it like this:
- @drawable/home
- @drawable/settings
- @drawable/logout
Then don't make a int[] just make a TypedArray like this:
TypedArray icons = getResources().obtainTypedArray(R.array.icons);
and get it with:
imageview.setImageDrawable(mIcons.getDrawable(position));