Color-O-Matic icon indicating copy to clipboard operation
Color-O-Matic copied to clipboard

Add EditText to Hex Indicator for manual input

Open jordyamc opened this issue 8 years ago • 2 comments

For HEX RGB and ARGB (I don't know how to add it to HSV :/)

jordyamc avatar Jun 12 '17 03:06 jordyamc

I have tested it a little bit and it gave me java.lang.StringIndexOutOfBoundsException when editing. I will add this feature but I need to test it more and add HSV editing too (if you don't do it before). Plus, when you tap the EditText the keyboard should be opened and the cursor should be in the last position, instead of the beginning. You can use your fork as a module until I implement those changes.

Thanks for your PR, by the way. :stuck_out_tongue:

GrenderG avatar Jun 12 '17 07:06 GrenderG

I have checked your changes and it keeps crashing if, for example, you try to erase the #.

java.lang.StringIndexOutOfBoundsException: length=0; index=0
    at java.lang.String.indexAndLength(String.java:500)
    at java.lang.String.charAt(String.java:494)
    at android.graphics.Color.parseColor(Color.java:209)
    at es.dmoral.coloromatic.view.ColorOMaticView.isHexCodeValid(ColorOMaticView.java:252)
    at es.dmoral.coloromatic.view.ColorOMaticView.access$000(ColorOMaticView.java:48)
    at es.dmoral.coloromatic.view.ColorOMaticView$3.onTextChanged(ColorOMaticView.java:138)

Also, in order to edit the HSV the user should be able to add spaces. Thanks!

GrenderG avatar Jun 13 '17 07:06 GrenderG