ambilwarna icon indicating copy to clipboard operation
ambilwarna copied to clipboard

Size on tablet and display value of selected color

Open DevMash opened this issue 7 years ago • 2 comments

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

DevMash avatar Mar 12 '17 12:03 DevMash

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.

denisk20 avatar Mar 12 '17 14:03 denisk20

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

DevMash avatar Apr 14 '17 15:04 DevMash