You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the compile and target SDK versions are changed to 28 in the sample app then this exception will be thrown during initial layout:
09-2516:36:31.4817552-7552/com.skydoves.colorpickerviewdemo E/AndroidRuntime:FATALEXCEPTION: main
Process: com.skydoves.colorpickerviewdemo, PID:7552
java.lang.IllegalArgumentException: x must be < bitmap.width()
at android.graphics.Bitmap.checkPixelAccess(Bitmap.java:1780)
at android.graphics.Bitmap.getPixel(Bitmap.java:1728)
at com.skydoves.colorpickerview.ColorPickerView.getColorFromBitmap(ColorPickerView.java:211)
at com.skydoves.colorpickerview.ColorPickerView.setSelectorPoint(ColorPickerView.java:356)
at com.skydoves.colorpickerview.ColorPickerView.selectCenter(ColorPickerView.java:402)
at com.skydoves.colorpickerview.ColorPickerView$1.onGlobalLayout(ColorPickerView.java:111)
at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:945)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2357)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1460)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7183)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:696)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(NativeMethod)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Edit: reverting the targetSdkVersion to 27 and leaving the compileSdkVersion at 28 suppresses the issue. They must have introduced additional restrictions to Bitmap.getPixel() in Android 28
The text was updated successfully, but these errors were encountered:
If the compile and target SDK versions are changed to 28 in the sample app then this exception will be thrown during initial layout:
Edit: reverting the targetSdkVersion to 27 and leaving the compileSdkVersion at 28 suppresses the issue. They must have introduced additional restrictions to
Bitmap.getPixel()
in Android 28The text was updated successfully, but these errors were encountered: