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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -