Reputation: 273
Hi, I want to display the last Bitmap
from a list of bitmaps to an ImageView
. Here is my code:
SubImageView = (ImageView) findViewById(R.id.SubImageView);
ArrayList<Bitmap> bitmapArray = new ArrayList<Bitmap>();
bitmapArray.add(myBitMap);
Upvotes: 1
Views: 12613
Reputation: 40416
if(bitmapArray.size() > 0)
{
int index = bitmapArray.size() -1;
Bitmap lastbitmap = bitmapArray.get(index);
SubImageView.setImageBitmap(lastbitmap);
}
Upvotes: 4