Saving ArrayList in SQLite database in Android

后端 未结 7 1712
臣服心动
臣服心动 2020-12-04 18:11

I\'ve been working with SQLite on android and I would like to add an arraylist to a column in a table, and then fetch the data back as an arraylist. The arraylist is a list

7条回答
  •  没有蜡笔的小新
    2020-12-04 19:02

    You'll have to do it manually, go through each item in the list and change it to byte before storing it in the database

    for (long l : array){
    //change to byte here
    //Store in database here
    }
    

提交回复
热议问题