Hey, is there a way I can make a PreferenceFragmen...
# android
a
Hey, is there a way I can make a PreferenceFragment extend LifecycleOwner? It wants me to implement getLifecycle but I’ve no idea how I would do that and I’m struggling to find anything relevant on google.
stackoverflow 1
t
PreferenceFragment is a subclass of the platform fragment class which is now deprecated. You want to use PreferenceFragmentCompat from
androidx.preference:preference:1.0.0-rc01
https://developer.android.com/reference/kotlin/androidx/preference/package-summary
or from the
com.android.support:preference-v7
package
a
Sweet, thanks. Is there somewhere in the documentation I should be looking for it to tell me that?
t
I am not sure. I usually just figure if there is something in the platform sources that we probably shouldn't use it and that there probably exists some support lib version that makes it actually usable