嗨,我想显示位图列表中最后一个BitmapImageView。这是我的代码:

SubImageView = (ImageView) findViewById(R.id.SubImageView);
ArrayList<Bitmap> bitmapArray = new ArrayList<Bitmap>();
bitmapArray.add(myBitMap);

最佳答案

if(bitmapArray.size() > 0)
{
  int index = bitmapArray.size() -1;
  Bitmap lastbitmap = bitmapArray.get(index);

  SubImageView.setImageBitmap(lastbitmap);
}

10-07 20:08