QuadFlask / colorpicker

🍭color picker for android
1.22k stars 219 forks source link

Refactor suggestion #76

Open ELO8C8 opened 7 years ago

ELO8C8 commented 7 years ago

You could extend ColorCircle with a new field: private float size; and store the size of each circle. (You have this value available in both Renderer classes.)

This way it is easier to draw a border around the currently selected circle. (I find it nicer with a single black circle with 3.0f stroke with around the selected one. Also this way you can skip some calculation logic in onDraw() function of ColorPickerView.

I use it like this: float size = Math.max(minimumSelectedCircleSize, currentColorCircle.getSize()); where minimumSelectedCircleSize is defined at init.

Good luck; very nice library by the way.