I have no problem doing:
currentImageButton.setImageBitmap(bitmap);
However, I have yet to be able to get the image bitmap back. I am trying to get the image bitmap BACK from the ImageButton and use it to set the background of my canvas.
currentImageButton.buildDrawingCache();
Drawable myDrawable = currentImageButton.getDrawable();
Bitmap anImage = ((BitmapDrawable) myDrawable).getBitmap();
canvas.drawBitmap(getResizedBitmap(anImage, 1000, 1000));
None of this seems to work though. I've even tried using myDrawable
to set change the background of my view, just incase it was something wrong with canvas but that doesn't work either.