team-supercharge / ShimmerLayout

DEPRECATED - Memory efficient shimmering effect for Android applications by Supercharge.
Apache License 2.0
2.51k stars 282 forks source link

IllegalArgumentException: width and height must be > 0 #53

Closed kavitamp closed 6 years ago

kavitamp commented 6 years ago

I am getting this error in ShimmerLayout class. What could be the issue?

Fatal Exception: java.lang.IllegalArgumentException: width and height must be > 0 at android.graphics.Bitmap.createBitmap(Bitmap.java:969) at android.graphics.Bitmap.createBitmap(Bitmap.java:948) at android.graphics.Bitmap.createBitmap(Bitmap.java:915) at io.supercharge.shimmerlayout.ShimmerLayout.createBitmap(ShimmerLayout.java:317) at io.supercharge.shimmerlayout.ShimmerLayout.getSourceMaskBitmap(ShimmerLayout.java:273) at io.supercharge.shimmerlayout.ShimmerLayout.drawMask(ShimmerLayout.java:203) at io.supercharge.shimmerlayout.ShimmerLayout.dispatchDrawUsingBitmap(ShimmerLayout.java:193) at io.supercharge.shimmerlayout.ShimmerLayout.dispatchDraw(ShimmerLayout.java:100)

veghtomi commented 6 years ago

@kavitamp try the newest version of the library (2.1.0)

veghtomi commented 6 years ago

@kavitamp is it working now as expected?

kavitamp commented 6 years ago

@veghtomi This error is not coming frequently. I have not tries it yet. Will let you know once it will get tested.

veghtomi commented 6 years ago

@kavitamp ok, in the meantime I close this issue since with the new version it cannot happen. If it happens, just open the issue again.

kavitamp commented 6 years ago

Sure. Thank you