Checkbox value is saved shared preference in android?
<p>Hi i have created base adapter in list view.I have implemented custom check box.What we need means if i have clicked multiple item saved in share preference.if i have unchecked means remove that item in that share preference.Please give me solution .</p>

<p>Here i have mention below this code :</p>

<pre><code>holder.checkBox.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {
    if (((CheckBox) v).isChecked()) {

        if (checkBoxState[position] = true) {
            // Calculate function
            chk = Integer.toString(v.getId());
            total += Double.valueOf(category.arrListPrice
                    .get(position));
            System.out.println("********************Checked"
                    + total);
            checkboxvalue.add(chk);
            adapter_list.notifyDataSetChanged();
        }

    } else {

        if (checkBoxState[position] = false) {
            System.out.println("*********************unchecked"
                    + total);
            total -= Double.valueOf(category.arrListPrice
                    .get(position));
            checkboxvalue.remove(chk);
            adapter_list.notifyDataSetChanged();
        }

    }

    if (listener != null) {
        Log.e("Callback", Double.toString(total));
        listener.totalAmount(Double.toString(total));

    }

}
});
</code></pre>
