I have a simple preference_headers.xml
file. I want to add some categories on my preference headers. I have tried to implement <PreferenceCategory />
in my preference_headers.xml
, but it doesn't work. I'm using API level 11. As shown in the figure below, Android Developers from official website can add the categories. How can I add it too?
And here is a few of my preference_headers.xml
code. It won't work:
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="ACCOUNT" >
<header android:fragment="com.example.preferenceheader.SettingsFragmentAccount"
android:title="@string/pref_header_category_account"
android:summary="@string/pref_header_summ_account"
android:icon="@drawable/ic_action_settings" />
</PreferenceCategory>
<PreferenceCategory android:title="APPLICATION" >
<header android:fragment="com.example.preferenceheader.SettingsFragmentApplication"
android:title="@string/pref_header_category_application"
android:summary="@string/pref_header_summ_application"
android:icon="@drawable/ic_action_group" />
</PreferenceCategory>
</preference-headers>
Thanks for your help.