Closed ashishkumart closed 6 years ago
It's not exist of clear methods. but you can set default color like this:
ColorPickerSharedPreferencesManager preferencesManager = new ColorPickerSharedPreferencesManager(mContext);
preferencesManager.putInteger("YOUR_COLORPICKER_NAME" + ColorPickerSharedPreferencesManager.COLOR, Color.WHITE);
and just call
colorPickerView.selectCenter();
Thank you for replying :). If I can't clear preference then it's creation is useless. Can you tell me how to set a colour to ColorPickerView? I will manage it by app's preference if I could set a colour to it. Its setting white colour as default. I need to setup custom colour.
Please suggest.
I think it seems to need clear saved preferences and set a color to ColorPickerView methods. I will add it soon. :) Thank you for your Issue!
it released at v1.0.3! You can set saved color manually and clear all of saved data using the following methods. But you must invoke setPreferenceName method before using them.
colorPickerView.setSavedColor(YOUR_COLOR);
colorPickerView.clearSavedData();
Many thanks @skydoves. I just want to confirm would this method (colorPickerView.setSavedColor(YOUR_COLOR);) put the pointer to the colour location on the picker?
not yet. I think it seems to need an algorithm like finding the color position from an image. for example the following image,
what is the best position for red color? or how to handle if not founded red color from an image?
So I'm thinking what is the best algorithm for choosing a color from images.
How can I clear the saved preference as I need to clear it after log out and need to set default colour for new user.