skydoves / ColorPickerPreference

🎨 A library that lets you implement ColorPicker, ColorPickerDialog, ColorPickerPreference.
Apache License 2.0
477 stars 51 forks source link

setPaletteDrawable always set to center #6

Closed StevenArmandLee closed 6 years ago

StevenArmandLee commented 6 years ago

You should not set it to center. if the developer who uses this one would like to make it center, he just need to call another line. however if you all center, all developers who doesn't want to make it to the center, will have to fork this repo and edit it by themself.

skydoves commented 6 years ago

Hi @StevenArmandLee. In case of drawable image size is changed by the smaller one, the selector will be positioned at blank space. so I think adding a 'selector not change mode' is better. Thank you! It will be applied next version.

StevenArmandLee commented 6 years ago

Hi, if that's the case the user will only need to call it manually.

For example for the case that you said, the user will only need to call a line of code.

For user who doesn't want to make it center every time the image is being set, the user will have to store the last point before setting the new image and set the point back to the saved one.

Thus in my opinion it might be a good idea to remove setcenter in your code.

My use case is that I will need to change the image alpha as the color wheel doesn't cover full range of RGB. because you do not open path to set the alpha of the image, I had to changed my alpha of my image and set it to your library.

Thanks,

skydoves commented 6 years ago

@StevenArmandLee It's changed at v1.0.4! I removed the set center in setPaletteDrawable and added hiding and showing selector and flagView. Thanks!

StevenArmandLee commented 6 years ago

Cool, will close this issue. you can invite me as contributor if you think it's a good idea to do so.