yukuku / ambilwarna

Android Color Picker aka AmbilWarna library ("Pick a Color" in Indonesian)
Other
222 stars 88 forks source link

Size on tablet and display value of selected color #24

Open DevMash opened 7 years ago

DevMash commented 7 years ago

Hi,

thanks for this nice color picker. Though we still got some problems with it :) We need the user to be able to set the color by providing a hex value, is it somehow possible to do this with this picker? For example: User wants to set the color with hex-value #fe6b7b - Is this somehow possible with this picker?

Another point that we found is the size of the colorpicker on tablets. Is there any way to adjust the picker on tablets? This is how the picker looks on tablet

If its currently not possible to do these settings, is it somehow possible to contribute?

Thanks in advance. Kind regards, Manuel

denisk20 commented 7 years ago

Hi Manuel, Initializing the picker from a hex value is totally possible, you'll need to provide some kind of UI (a TextView for instance) for the user to enter the hex value, parse that value and convert it into an int and then initialize the dialog with this value using one of constructors both of which accept int color: https://github.com/yukuku/ambilwarna/blob/master/library/src/main/java/yuku/ambilwarna/AmbilWarnaDialog.java#L47. As for your second question, the size of the dialog indeed doesn't scale well on tablets, although on my nexus 7 it doesn't look as bad as you've shown. This is definitely something worth improving, and contributions would be very welcome.

DevMash commented 7 years ago

Hi Denis,

I forked the project. I have changed the layout to work with bigger screens and added a hex field into the picker. The hex field is always there (not configurable). Feel free to pick the commit.

Kind regards, Manuel