Open gitdefllo opened 7 years ago
Weirdly I have to set (again) the lightness color in a runnable as:
colorPickerView.setInitialColor(mColor, false);
// assuming that mBarLightness is the LightnessSlider view
mBarLightness.post(new Runnable() {
@Override
public void run() {
mBarLightness.setColor(mColor);
}
});
I said again because in the ColorPickerVIew
you already did it in onLayout(...)
which call setLightnessSlider(...)
and set the color into it... that's why it seems weird.
I have met same issue
By setting an initial value with
setInitialColor(int, boolean)
, the lightness slider is not updating. It stays at position0
, whereas the alpha slider is updated correctly.For example, if I do this:
I got the below result on the left:
However, if I select another color directly in the wheel, the sliders are both updating properly, like the right screenshot above (full light, full opacity).
context: used in fragment with widgets in xml (no dialog)