Possible Duplicate:
Bulk Insertion on Android device
So i want to add about 300 entries to a sqlite database table for my android app. I want to do this fast and efficiently without a noticeable delay for the users. I have a list of itmes on hand that i want to add (THIS LIST WILL NOT DYNAMICALLY CHANGE). Should i make an arryalist and then iterate through that list to add the entries or should i run a method like this for every entry string that i want to add?:
public long creatSQLEntry(String name){
ContentValues cv = new ContentValues();
cv.put(COLUMN_STUFF, name);
return myDatabase.insert(MY_Table, null, cv);
}
Im thinking that the above code isn't the most efficient way to do this. Anyone know how to do this? some sample code would be awesome but is not a must.