Allows to have an ActionBar even on PreferenceActivity, even for pre-Honeycomb versions of Android.
All this library does is to simply put a Toolbar at the top of the PreferenceActivity, and you need to use the Toolbar instead of the ActionBar.
Gingerbread :
Lollipop :
This library needs:
- API 8 and above.
- AppCompat v7.
That's it.
Sadly, it doesn't style the preferences, but you can use the one of the support library if you wish.
It has handled dialogs in the past, but no longer. If you wish to have material-style dialogs, you can use this great library: https://github.com/fengdai/AlertDialogPro
Also, note that in order to add action items, you need to do it completely via code, without using XML. Otherwise, on some Android versions (or all?), the action items will all gather inside the overflow menu item.
Didn't get a lot of code from others:
- Some code I got from my own app: https://play.google.com/store/apps/details?id=com.lb.app_manager
- The support library of Google, of course: http://android-developers.blogspot.co.il/2014/10/appcompat-v21-material-design-for-pre.html
- This website: https://chris.banes.me/2014/10/17/appcompat-v21/