Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in onDraw() once alpha channel enabled #100

Open
riggaroo opened this issue Oct 9, 2020 · 0 comments
Open

NullPointerException in onDraw() once alpha channel enabled #100

riggaroo opened this issue Oct 9, 2020 · 0 comments

Comments

@riggaroo
Copy link

riggaroo commented Oct 9, 2020

Hi there 馃憢
Thanks for a great library 馃 We've been using it pretty successfully without any issues for a while. Recently, I enabled the alpha slider in XML via app:cpv_alphaChannelVisible="true", but now we are experiencing a crash with the onDraw function.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Rect.width()' on a null object reference
       at com.jaredrummler.android.colorpicker.ColorPickerView.onDraw(ColorPickerView.java:265)
       at android.view.View.draw(View.java:23191)
       at android.view.View.updateDisplayListIfDirty(View.java:22066)
       at android.view.View.draw(View.java:22921)
       at android.view.ViewGroup.drawChild(ViewGroup.java:5230)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4987)
       at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1882)
       at android.view.View.draw(View.java:23194)
       at android.view.View.updateDisplayListIfDirty(View.java:22066)
       at android.view.View.draw(View.java:22921)
       at android.view.ViewGroup.drawChild(ViewGroup.java:5230)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4987)
       at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1882)
       at androidx.constraintlayout.motion.widget.MotionLayout.dispatchDraw(MotionLayout.java:2885)
@riggaroo riggaroo changed the title NullPointerException in onDraw() once we enabled alpha channel NullPointerException in onDraw() once alpha channel enabled Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant