Reputation: 169
Hello any idea how I can put 3 checkboxes under another checkbox? Kind of like the 3 checkboxes are a subcategory of the main checkbox. Any help is appreciated!! (This is for Preferences)
Upvotes: 0
Views: 49
Reputation: 411
This xml has a checkbox that enables/disables (android:dependency="activate_export") three checkbox below.
<CheckBoxPreference
android:defaultValue="false"
android:disableDependentsState="false"
android:key="activate_export"
android:summary="@string/activate_export_summary"
android:title="@string/activate_export_title" />
<PreferenceCategory
android:dependency="activate_export"
android:key="@string/export_pdf"
android:title="@string/pref_cat_ImportExport_Summary" >
<CheckBoxPreference
android:dependency="activate_export"
android:key="export_pdf"
android:title="@string/export_pdf" >
</CheckBoxPreference>
<CheckBoxPreference
android:dependency="activate_export"
android:key="export_ppt"
android:title="@string/export_ppt" >
</CheckBoxPreference>
<CheckBoxPreference
android:dependency="activate_export"
android:key="export_html"
android:title="@string/export_html" >
</CheckBoxPreference>
</PreferenceCategory>
Upvotes: 1