Closed vauywaves closed 7 years ago
There are a couple of issues here:
(1) is a hack that I'm looking at fixing. Regarding (2), you may need something like the following to reset your colors. (Works for me):
getPreferenceManager().getDefaultSharedPreferences(getActivity()).edit().clear().commit();
getActivity().recreate(); // Needed to refresh the views :-(
I've just released version 2.0, in which I've got android:defaultValue
working. After upgrading, you'll need to use that instead of any app:colorpicker_defaultColor
settings you have.
This might help you with what you're trying to achieve, although the code above works for me in any case.
Does any of the above solve your problem?
I'll interpret silence as "problem solved".
Hi, this is a great library for Android Color picker with alpha and hex display options. Tons of thanks for such a wonderful library.
While using it in one of my apps, in settings.xml i provide a value for app:colorpicker_defaultColor. Also in my Launcher Activity i am initializing preferences values from their defaults as PreferenceManager.setDefaultValues(this, R.xml.settings, false);
It seems PreferenceManager is not setting the default values for com.rarepebble.colorpicker.ColorPreference. Kindly confirm, am i missing something.
Thanks & Regards