I have a common PreferenceCategory named common.xml :
<?xml version="1.0" encoding="utf-8"?>
<PreferenceCategory
xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceScreen
android:title="Common preference screen" />
</PreferenceCategory>
I would like inflate it and attach to different PreferenceScreen(s) (not all) in my PreferenceActivity hierarchy. I searched how to, but after many tries, I have not any solution.
I recently came up with a solution. It’s maybe more complex than what you are looking for but here are the basics:
I wrote a detailed blog article, along with sample code and 2 Eclipse projects.