Closed ClaudeHangui closed 7 years ago
@ClaudeHangui can you provide more details ? generally, it's because you load larger bitmap , so check the memory usage of your application.
The same thing happened to me. In my case, my layout had a default background image where I used to test. I just removed it and it worked.
@ethanhua It's a default image which serves as a placeholder....When you mean I may be loading a larger bitmap, is there a recommended size for the bitmap ??
@ClaudeHangui @jeancsanchez How many times the crash occured ? and what kind of phone the crash happened? also you can see this: https://github.com/team-supercharge/ShimmerLayout/issues/25
I'm using the Shimmerlayout in a viewpager....Each fragment of the viewpager has a recyclerview... So upon scrollling inside one of my fragments, my app crashed and I get this error:
Here is the method in question: `private Bitmap createBitmap(int width, int height) { try { return Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); } catch (OutOfMemoryError e) { System.gc(); return Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); }
}`