I am having a problem with my Android code. I am developing a game on Android. I first stored my images on resource file. But now I want to store them on Firebase. My plan was to download them using Picasso and add them to an Arraylist. But it doesnt have a method for returning just a drawable object. I tried to fetch BitMap and convert it to a drawable but it didnt work.
flagImages=new ArrayList<Drawable>();
flagImages.add(getResources().getDrawable(R.drawable.flag1));
flagImages.add(getResources().getDrawable(R.drawable.flag2));
flagImages.add(getResources().getDrawable(R.drawable.flag3));
I want to change the code above. Do you have any ideas? What should I use? My primary aim is to put the images into my ArrayList.