The following worked for me:
Create each preference as a separate XML and a separate Activity! . This will prevent the inheritance of such properties.
You can then call the child preference from the parent preference as follows:
<Preference android:key="TODO" android:title="@string/TODO" android:summary="@string/TODO" > <intent android:action="com.example.project.preference.child1" /> </Preference>
And your preference for your child should have the same action defined on the manifest
<action android:name="com.example.project.preference.child1" />
Make sure com.example.project.preference.child1 is unique!
Now, in the values ββof /styles.xml, add the following:
<style name="app_theme_no_title_pref" parent="android:Theme.Light"> <item name="android:windowNoTitle">true</item> </style>
Of course, you can change the android: Theme.Light to everything you need.
In Manifest, add this to all Activity, parent and children settings:
android:theme="@style/app_theme_no_title_pref"
So, in your manifest, your child's preference. Actions should look like this:
<activity android:name=".TODO" android:label="@string/TODO" android:theme="@style/app_theme_no_title_pref"> <intent-filter> <action android:name="com.example.project.preference.child1" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>