Tuesday, 5 June 2018

android - recyclerview - get bitmap

How can I get the bitmap from a recyclerview?

recyclerview.setDrawingCacheEnabled(true);
    
Bitmap bitmap = recyclerview.getDrawingCache();
    
recyclerview.setDrawingCacheEnabled(false);
    
     
Bitmap newBmp = bitmap.copy(bitmap.getConfig(),true);

And I'm getting an exception

java.lang.IllegalStateException: Can't copy a recycled bitmap



from android - recyclerview - get bitmap

No comments:

Post a Comment