I\'ve come to a sudden halt in the development of my app as I realized that PreferenceFragments weren\'t supported in this library. Are there any alternatives that a rookie
You coul maybe use a real activity and use fragment, but I don't think it's a good choice. You should use simple PreferenceActivity and wait for improvements in retro compat libs.
As Lucius said you can use PreferenceFragmentCompat :
public class MyPreferenceFragment extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle bundle, String s) {
PreferenceManager.setDefaultValues(getActivity(), R.xml.preferences, false);
addPreferencesFromResource(R.xml.preferences);
}
}
You must include its dependency in gradle:
dependencies {
...
compile 'com.android.support:preference-v7:23.1.X' (wherX = 0,1,...)
...
}
This way you can also can use FragmentTransaction of android.support.v4.app.FragmentTransaction and PrefernceFragment. However, you maybe have problems with themes. If it is the case, you can solve it having into account this post:
Solution to make the lib work on API 7+ while keeping material theme on API 14+
You can use third party libraries such as UnifiedPreferences to use a single API for all versions of Android.