Reputation: 1022
Can someone instruct me how to save the state of the checkbox's of a multiple choice listview? i'm trying to save the state into a database but it could also be done using shared preferences, i think.
my regards.
Upvotes: 1
Views: 490
Reputation: 8079
Why not just store the booleans in the database as integers or text for that matter and just convert them in your insert/extract method?
Upvotes: 0
Reputation: 234797
Two months on this problem? Yikes!
The first approach that occurs to me is to save a comma-separated text string of the checked index positions. On retrieval, you can split the string at the commas and parse the int values into an int array to recover the indexes, and then use that for whatever you need (restoring checked states, processing the checked items, whatever).
Upvotes: 1