Android: How can I make a Drawable array? -
How can I create an array that handles some of my images so that I can use it this way?
ImageView.setImageResource (image [1]);
I hope I explained well ...
int [] myImageList = New int [] (R.drawable.thingOne, R.drawable.thingTwo}; // later ... myImageView.setImageResource (myImageList [i]);
or a resizable version For:
ArrayList & lt; Integer & gt; MyImageList = New Arrestist & lt;> (); myImageList.add (R.drawable.thingOne); // In ... myImageView.setImageResource (myImageList.get (i));
Comments
Post a Comment