BubbleShowCase-Android
BubbleShowCase-Android copied to clipboard
Crash on some devices
hello, the library is great. but on some devices I am getting the following crash
java.lang.IllegalArgumentException: y + height must be <= bitmap.height() at android.graphics.Bitmap.createBitmap(Bitmap.java:784) at android.graphics.Bitmap.createBitmap(Bitmap.java:748) at com.elconfidencial.bubbleshowcase.BubbleShowCase.takeScreenshotOfLayoutView(BubbleShowCase.kt:361) at com.elconfidencial.bubbleshowcase.BubbleShowCase.takeScreenshot(BubbleShowCase.kt:348) at com.elconfidencial.bubbleshowcase.BubbleShowCase.addTargetViewAtBackgroundDimLayout(BubbleShowCase.kt:217) at com.elconfidencial.bubbleshowcase.BubbleShowCase.access$addTargetViewAtBackgroundDimLayout(BubbleShowCase.kt:25) at com.elconfidencial.bubbleshowcase.BubbleShowCase$show$1.run(BubbleShowCase.kt:108) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5731) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) at dalvik.system.NativeStart.main(Native Method)
where view isn't in screen occured this exception
@aihamdev did you find workaround for this?
The issue might be caused if the view for the BubbleShowCase is not on the screen. I check if the view is on screen using this https://devanshuchandra.medium.com/android-how-to-determine-if-a-view-is-onscreen-offscreen-or-partially-offscreen-partially-visible-642e2cca1dbd