emkayDauda / ColorSlider

Lightweight color-picker library for android
Apache License 2.0
44 stars 1 forks source link

[Feature request] Possible to change orientation? #1

Open erenjaegar opened 1 year ago

erenjaegar commented 1 year ago

I would like to have this component be rendered vertically as part of my sidebar. Will it be possible to do this? I can also look into it on my own and make an MR if I succeed, but I would appreciate any piece of advice you can offer

emkayDauda commented 1 year ago

Hi, thanks for checking the library out!

Vertical orientation appears to be quite the challenge. The slider component is based on a normal android seekbar and it appears you could just change the rotation attribute on the XML component, although that seems to present its own challenges too.

I can probably look into this some more, but if you wanted to look attempt it yourself, I would start with the rotation attribute and then perhaps a manual rotation with the canvas in the onDraw function