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

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -