martin-stone / hsv-alpha-color-picker-android

A color picker and a color preference for use in Android applications.
Apache License 2.0
290 stars 60 forks source link

Dark Theme how to implement #55

Closed vulterey closed 4 years ago

vulterey commented 4 years ago

Hi,

I am trying to use your color picker in the preference screen, but I cannot make it apear in Dark version as it shown in the demo app. Is there any extra setting which I miss to add to my root_preferences.xml file?

Kind Regards

Adam

vulterey commented 4 years ago

Found it ;)

In the:

public static class SettingsFragment extends PreferenceFragmentCompat {
    @Override
    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {

Instead of: setPreferencesFromResource(R.xml.root_preferences, rootKey); I should use: addPreferencesFromResource(R.xml.root_preferences);

    }
martin-stone commented 4 years ago

Glad you worked it out. (I wasn't sure where I'd start debugging this -- It has simply behaved as expected for me.)

vulterey commented 4 years ago

Glad you worked it out. (I wasn't sure where I'd start debugging this -- It has simply behaved as expected for me.)

Thank you for quick reply. BTW very nice color picker and a good manual for installation.