jaredrummler / ColorPicker

A highly customizable color picker for Android
Apache License 2.0
793 stars 172 forks source link

setAlphaSliderVisible() bug fixed #88

Open mianaliasjad opened 4 years ago

mianaliasjad commented 4 years ago

I have fixed issue with a scenario:

in XML make app:cpv_alphaChannelVisible="false" and in code on button click colorPickerView.setAlphaSliderVisible(true); it was not showing alpha slider becasue onSizeChanged(int w, int h, int oldw, int oldh) was not gettlng called after requestLayout();

so i have moved code from onSizeChanged(int w, int h, int oldw, int oldh) to onLayout(boolean changed, int left, int top, int right, int bottom). Also created a simple getter method to check if Alpha slider is visible or not.