Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom image not working as picker on the latest version #28

Open
miliath opened this issue Aug 18, 2021 · 2 comments
Open

Custom image not working as picker on the latest version #28

miliath opened this issue Aug 18, 2021 · 2 comments

Comments

@miliath
Copy link

miliath commented Aug 18, 2021

Library version:

  • 2.0.5
  • 2.0.4
  • 2.0.3

Devices:

  • Pixel 4
  • Pixel 4a
  • Pixel 3
  • Basically every phone tested, the bug is not phone-dependant

Setting a custom color palette as a colorpicker (a custom image) will make the selected color always 0. This happens with a horseshoe shaped picker I have, but has also happend with other images. Also colorPickerView.setSelectorPoint(x,y), then doing colorPickerView.getColor(); where x,y is the current position of the color, yields 0.
The selector is being set through the following line:
colorPickerView.setPaletteDrawable(colorSelector);
Where colorSelector is a drawable.

The expected behaviour would be to be able to set a custom color palette, as is possible in version 2.0.2, Do i have to add anything extra? I had a workaround to a problem with restricting the color selector that would allow me to set an x,y point and then call getColor() to know what color was selected, this is no longer possible since version 2.0.3.

With the deprecation of jCenter and 2.0.2 not being available on mavenCentral and the pom being broken, 2.0.2 can not be downloaded from jitpack.io i don't really know what to do to actually still be able to use 2.0.2 or get the newest versions to work..

@miliath
Copy link
Author

miliath commented Aug 18, 2021

When trying to get version 2.0.2 from jitpack, this error is displayed, changing 2.0.2 to 2.0.5 works fine, so there is likely something wrong with the configuration of 2.0.2

Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.github.skydoves:colorpickerview:2.1.8.
Required by:
project :app > com.github.skydoves:ColorPickerPreference:2.0.2
> Could not resolve com.github.skydoves:colorpickerview:2.1.8.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/github/skydoves/colorpickerview/2.1.8/colorpickerview-2.1.8.pom'.
> Could not HEAD 'https://dl.google.com/dl/android/maven2/com/github/skydoves/colorpickerview/2.1.8/colorpickerview-2.1.8.pom'.
> Remote host terminated the handshake

@miliath
Copy link
Author

miliath commented Aug 18, 2021

As i can see on the debugger, the image as palette is being set correctly, however, the selectedPoint is always 385,385 which i assume is the center, since the selected image is a horseshoe, the center is transparent. Despite the real point being set to 219,169, the colorPicker still mantains the 385,385 point.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant