[Solved] how do i insert expandable listview child item into sqlite? [closed]


Firstly, create the Database using SQLiteOpenHeler class and create the table. Add the columns in the table for what you want to save list item. After the database is ready, now you can insert into sqlitedatabase. For Example your List item is “Person” and person has first name and last name. Your table will contain first name and last name columns. On click you will do something like following:

Person person = list.get(position);

ContentValues values = new ContentValues();
values.put("column_first_name", person.getFirstName());
values.put("column_last_name", person.getLastName());

getWriteableDatabase().insert(TABLE_NAME, null, values);

Hope this helps.

4

solved how do i insert expandable listview child item into sqlite? [closed]