I\'m creating a RecyclerView
to show a Grid of pictures. When selecting one of them, it should open a new activity with a transition.
I\'m using Glide l
I suspect that once in a while your bitmap gets into the recycled state just before the Canvas
gets a chance to draw onto it here drawable.draw(canvas);
.
A quick solution should be not to call bitmap.recycle();
, which is not strictly required for android >2.3.3. If you still want to reclaim this memory forcefully, you'll have to find a way to check when the bitmap is indeed no longer needed (i.e., Canvas
had a chance to finish its drawing operations).