Android examples for Database:Cursor Convert
convert Cursor To Content Values
//package com.java2s; import android.content.ContentValues; import android.database.Cursor; import java.util.List; public class Main { public static void convertToContentValues(Cursor cursor, List<ContentValues> list) { if (isEmpty(cursor)) { return; }//from www.ja v a 2 s .c o m cursor.moveToFirst(); do { ContentValues contentValues = new ContentValues(); //converter.convert(cursor, contentValues); list.add(contentValues); } while (cursor.moveToNext()); } public static boolean isEmpty(Cursor cursor) { return cursor == null || cursor.getCount() == 0; } }