14

My android application is using the compatibility library quite heavily (Loaders in particular). I need to be able to use compatibility components everywhere, including my PreferenceActivity. Sadly, the support library does not include a fragment-based PreferenceActivity, nor the PreferenceFragment class.

I'm toying with the idea of making my own PreferenceFragmentActivity and CompatPreferenceFragment (basically what Google neglected to do). Others, including some on StackOverflow, have mentioned accomplishing this exact thing, so I am openly asking for help of any kind -- guidance, tips, suggestions, code samples (if you are willing and able to share), or whatever else you deem relevant to this problem.

If someone can also direct me to the site where people file feature requests for Android, I'd like to add my name to the list of folks who want Google to address this in a future release of the support library.

Karakuri
  • 38,365
  • 12
  • 84
  • 104
  • possible duplicate of [Alternatives to PreferenceFragment with android-support-v4](http://stackoverflow.com/questions/9783368/alternatives-to-preferencefragment-with-android-support-v4) – C-- Jan 22 '14 at 15:10
  • 1
    possible duplicate of [Was PreferenceFragment intentionally excluded from the compatibility package?](http://stackoverflow.com/questions/5501431/was-preferencefragment-intentionally-excluded-from-the-compatibility-package) – theblang Aug 31 '15 at 13:53

2 Answers2

10

Look at Fr4gg0r's implementation of PreferenceFragment using reflex at http://forum.xda-developers.com/showthread.php?t=1363906

Vladimir Dmi
  • 161
  • 2
  • 6
0

See the latest revision of the v7 support library, which introduced a PreferenceFragmentCompat.

theblang
  • 10,215
  • 9
  • 69
  • 120