Reputation: 1061
I have an imageView from which I take visible part of image with getDrawingCache()
. It works well. But when I change image in imageView and try to get bitmap from it, getDrawingCache()
returns bitmap of the first image. I tried to call this method buildDrawingCache()
before calling getDrawingCache()
but it didn't help.
How can I refresh cache or associated bitmap or I don`t know what in order to get new image?
Upvotes: 0
Views: 832
Reputation: 1061
Solution was very simple:
imageView.destroyDrawingCache();
imageView.buildDrawingCache();
imageView.getDrawingCache();
Upvotes: 1