chiralcode / Android-Color-Picker

Color picker for Android
Apache License 2.0
193 stars 65 forks source link

Rotation cause canvas corruption #6

Open kuldeepdhaka opened 9 years ago

kuldeepdhaka commented 9 years ago

when ColorPickerDialog is visible and screen is rotated, older view is not cleared and new view is drawn. and the final view is corrupted

harsimran1993 commented 7 years ago

in onreisze add path.reset() at end before each path arcto() method

    colorViewPath.reset();
    colorViewPath.arcTo(outerWheelRect, 270, -180);
    colorViewPath.arcTo(innerWheelRect, 90, 180);

    valueSliderPath.reset();
    valueSliderPath.arcTo(outerWheelRect, 270, 180);
    valueSliderPath.arcTo(innerWheelRect, 90, -180);