Hi I am new in programming..
I want to show a random GIF image to ImageView using Ion. For single GIF it is ok, I simply use this line
Ion.with(imgView3).load("file:///android_asset/gif130407.gif");
But I have multi GIF images in multi directories in assets folder and I want first check the directory and gets all GIFs as array passing to Random and then show the Random id to ImageView using Ion I try it with png and Drawables its work perfect, but Ion "load" method gets a string address of the file how can I do this.
If you know specificly, where your gifs are, you could create a String Array or ArrayList with item type String. Then you can take it and get a random gif by putting in a Random index.
Otherwise if you want it, you are doing now, with the resource ids, you can look for the getResource methods in your context/activity. But i would prefer a list. If you could write a bit more detailed, why you need these random gifs (e.G. Security-Check, Game, EasterEgg...), i can give you a better answer.