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

java.lang.ClassCastException: com.rarepebble.colorpicker.ColorPreference cannot be cast to androidx.preference.Preference #52

Closed ployt0 closed 4 years ago

ployt0 commented 4 years ago

This isn't yet compatible with androidx, so it cannot be part of an androidx/preference/PreferenceScreen.java

martin-stone commented 4 years ago

Use version 3 (Currently on a branch, but will soon be merged to master.) I'm using it successfully in an AndroidX project. Note that there's an extra onDisplayPreferenceDialog integration needed, which is covered in the readme on the branch.

martin-stone commented 4 years ago

PS: You may need to set android.enableJetifier=true in your gradle.properties if you haven't already.

yvolk commented 4 years ago

@ployt0 I did the Color Picker migration to AndroidX in my own repo, see https://github.com/martin-stone/hsv-alpha-color-picker-android/issues/54