Closed tobiaswicker closed 4 years ago
Bug: Neither the picker nor any of the sliders reflect the app:default_color set in xml.
app:default_color
Example preference.xml:
preference.xml
<?xml version="1.0" encoding="utf-8"?> <androidx.preference.PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto"> <PreferenceCategory app:title="@string/overlay_category_title" app:iconSpaceReserved="false"> <com.skydoves.colorpickerpreference.ColorPickerPreference app:key="color_background" app:title="@string/color_background" app:preference_dialog_title="@string/color_background" app:preference_dialog_positive="@string/confirm" app:preference_dialog_negative="@string/cancel" app:preference_palette="@drawable/palette" app:preference_selector="@drawable/wheel" app:default_color="@color/default_overlay_background" app:actionMode="always" app:preferenceName="color_background" app:iconSpaceReserved="false" /> </PreferenceCategory> </androidx.preference.PreferenceScreen>
Value of @color/default_overlay_background is #4CAF50.
@color/default_overlay_background
#4CAF50
Expected Behavior:
The hue picker as well as the alpha and brightness sliders should take into account the default_color if there is no preference available for the SharedPreferences key.
default_color
SharedPreferences
Released in the new version 2.0.4.
Bug: Neither the picker nor any of the sliders reflect the
app:default_color
set in xml.Example
preference.xml
:Value of
@color/default_overlay_background
is#4CAF50
.Expected Behavior:
The hue picker as well as the alpha and brightness sliders should take into account the
default_color
if there is no preference available for theSharedPreferences
key.