Reputation: 874
So I have an ArrayList of Bitmap Images in my android app, and when I try to update the source of the image, nothing happens. The ImageView displays the first Bitmap Image without a problem in my app, but when I try to update the ImageView with a new Bitmap image, nothing changes, and I receive no errors and my app does not crash. Here is the code:
public void setFirstImage() {
imagePreview.setImageBitmap(framesArray.get(0));
}
public void setLastImage() {
Log.e("Image to display", "The image is " + framesArray.get(5));
// Yes, this image does exist
imagePreview.invalidate();
imagePreview.setImageBitmap(framesArray.get(5));
}
Upvotes: 1
Views: 995