Closed MaSiYuan closed 5 years ago
Same here
rightOffset = x + getWidth() - rightOffset <= screenWidth() ? rightOffset : screenWidth() + getWidth() - x;
This solves the error!!!
thank you @gtaricsi
@MaSiYuan does this happen to you after you no longer need the blur view?
@nimrodbens it happened to me after rotating screen and enabling blur again
I'm just throwing out guesses here but did you call invalidate()
after the screen was rotated? maybe also call pauseBlur()
before you rotate the screen and then invalidate()
and startBlur()
afterwards. it is for sure sounds like a problem with the different widths and heights of the different screen orientations.
@gtaricsi Thanks, it works!
FATAL EXCEPTION: main Process: com.test.app, PID: 24005 java.lang.IllegalArgumentException: x + width must be <= bitmap.width() at android.graphics.Bitmap.createBitmap(Bitmap.java:891) at android.graphics.Bitmap.createBitmap(Bitmap.java:858) at com.wonderkiln.blurkit.BlurLayout.blur(BlurLayout.java:169) at com.wonderkiln.blurkit.BlurLayout.invalidate(BlurLayout.java:88) at com.wonderkiln.blurkit.BlurLayout$1.doFrame(BlurLayout.java:77) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:924) at android.view.Choreographer.doCallbacks(Choreographer.java:735) at android.view.Choreographer.doFrame(Choreographer.java:664) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:912) at android.os.Handler.handleCallback(Handler.java:761) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6531) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)