Closed nathansbird closed 4 years ago
Same issue, personally I have this problem when I want to initialize the ColorPicker (and especially the LightnessSlider) with a predefined value before it appears for the first time.
EDIT : The problem doesn't show up if the visibility of the ColorPickerView is initially set to View.INVISIBLE instead of View.GONE. Of course, it's not the same behavior, but this can be a good workaround in some cases.
I added the flower color picker view into an alert dialog to allow my users to be able to pick a color in a popup. A bug I just noticed is that if the ColorPickerView's visibility is set to View.GONE before the popup is displayed, calling something like
setLightness()
throws a NullPointerException stating that the currentColorCircle is null. I'll just have to find a workaround for this in the meantime but looking around in the source code for this library, I noticed the root cause of this issue is that a lot of the logic relies on a render to happen at some point in time.Crash report for reference: