skydoves / ColorPickerView

🎨 Android colorpicker for getting colors from any images by tapping on the desired color.
Apache License 2.0
1.6k stars 211 forks source link

Can we set the Image Resource via Java Code ? #2

Closed IAmSarthakVerma closed 7 years ago

IAmSarthakVerma commented 7 years ago

I want to set the app:src="@drawable/image" via java code. Please help me regarding this.

skydoves commented 7 years ago

@IAmSarthakVerma I'm sorry about the late reply. on v1.0.1 you can change palette and selector drawable resource as using colorPickerView.setPaletteDrawable(Drawable drawable) colorPickerView.setSelectorDrawable(Drawable drawable) method. thanks!

IAmSarthakVerma commented 7 years ago

Thank you @skydoves

IAmSarthakVerma commented 7 years ago

@skydoves I am now able to select the palette image from java code but after that I am not able to use the color listener .

skydoves commented 7 years ago

@IAmSarthakVerma I'm sorry about the late reply. It fixed. Thank you.

IAmSarthakVerma commented 7 years ago

No Problem! I'll try to implement it soon! Thank you for your support :) <3