Friday, 15 January 2010

android - How to add the category on preference header? -



android - How to add the category on preference header? -

i have simple preference_headers.xml file. want add together categories on preference headers. have tried implement <preferencecategory /> in preference_headers.xml, doesn't work. i'm using api level 11. shown in figure below, android developers official website can add together categories. how can add together too?

and here few of preference_headers.xml code. 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 help.

it's been close year since asked run illustration @ http://www.101apps.co.za/articles/preference-settings.html think describes requirement of question in great detail , explanation.

i hope help has helped me since details process of building preference screen categories , headers on same page!

cheers.

android preference-headers

No comments:

Post a Comment