ECLaboratorio / BubbleShowCase-Android

BubbleShowCase is a framework that let you to use informative bubbles to help your users pointing out different App features.
MIT License
598 stars 89 forks source link

Crash on some devices #30

Open aihamdev opened 5 years ago

aihamdev commented 5 years ago

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)

abbasalim commented 5 years ago

where view isn't in screen occured this exception

progfast commented 3 years ago

@aihamdev did you find workaround for this?

jstrassmayr commented 1 year ago

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