java - Android PreferenceActivity selections to a file -


i have preferenceactivity have list of items , checkboxes.

public class bevcat extends preferenceactivity { sharedpreferences prefs = preferencemanager.getdefaultsharedpreferences(this); @override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     addpreferencesfromresource(r.xml.bev_pref);     } } 

here corresponding xml:

<?xml version="1.0" encoding="utf-8"?> <preferencescreen xmlns:android="http://schemas.android.com/apk/res/android" > <preferencescreen     android:key="button_voicemail_category_key"     android:persistent="false"     android:title="juice" >      <checkboxpreference         android:defaultvalue="false"         android:key="applejuice"         android:summary=""         android:title="apple juice" />     <checkboxpreference         android:defaultvalue="false"         android:key="cranberryjuice"         android:summary=""         android:title="cranberry juice" />       <checkboxpreference         android:defaultvalue="false"         android:key="grapejuice"         android:summary=""         android:title="grape juice" />        <checkboxpreference         android:defaultvalue="false"         android:key="orangejuice"         android:summary=""         android:title="orange juice" />         <checkboxpreference         android:defaultvalue="false"         android:key="v8splash"         android:summary=""         android:title="v8 splash" /> </preferencescreen>   <preferencescreen     android:key="button_voicemail_category_key"     android:persistent="false"     android:title="soft drinks" >     <checkboxpreference         android:defaultvalue="false"         android:key="pepsi"         android:summary=""         android:title="pepsi" />     <checkboxpreference         android:defaultvalue="false"         android:key="cocacola"         android:summary=""         android:title="coca cola" />     <checkboxpreference         android:defaultvalue="false"         android:key="othersoda"         android:summary=""         android:title="other soda" /> </preferencescreen>   <preferencescreen     android:key="button_voicemail_category_key"     android:persistent="false"     android:title="sports/energy drinks" >     <checkboxpreference         android:defaultvalue="false"         android:key="gatorade"         android:summary=""         android:title="gatorade" />     <checkboxpreference         android:defaultvalue="false"         android:key="powerade"         android:summary=""         android:title="powerade" />     <checkboxpreference         android:defaultvalue="false"         android:key="energydrinks"         android:summary=""         android:title="energy drinks" /> </preferencescreen>   <preferencescreen     android:key=""     android:persistent="false"     android:title="water" >     <checkboxpreference         android:defaultvalue="false"         android:key="water"         android:summary=""         android:title="water" /> </preferencescreen>   <preferencescreen     android:key="button_voicemail_category_key"     android:persistent="false"     android:title="drink mixes" >     <checkboxpreference         android:defaultvalue="false"         android:key="powdered"         android:summary=""         android:title="powdered/mixes" />      <checkboxpreference         android:defaultvalue="false"         android:key="tea"         android:summary=""         android:title="tea" /> </preferencescreen>   </preferencescreen> 

this list of categories once clicked, leads list of products , checkboxes.

my ultimate goal check off boxes on several lists this, have list contains selections of these lists. how can go doing this?

thanks


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -