I cant find out how to save boolean array into sqlite. I dont think you can but im using boolean array for setmulichoiceitems and it wont let me use anything else than boolean arary so how would i save it to a database. couldi covert boolean array to string or something some how
boolean[] states = {false, false, false, false, false, false, false};
final CharSequence[] items = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
AlertDialog.Builder builder = new AlertDialog.Builder(AddTimeEntry.this);
builder.setTitle("Repeat");
builder.setIcon(R.drawable.icon);
builder.setMultiChoiceItems(items, states, new DialogInterface.OnMultiChoiceClickListener(){
public void onClick(DialogInterface dialogInterface, int item, boolean go) {
I just use TEXT and set it to “true” or “false” and then use
EDIT To convert the boolean back to a string use
if you want to use an int then
and
EDIT 2 A string array is added to by
string[0] = "text to add"or you can add them when you declare is