Android examples for Database:Cursor Convert
Convert cursor To String Array
//package com.java2s; import android.database.Cursor; import java.util.ArrayList; public class Main { public static void cursorToStringArray(Cursor c, ArrayList<String> arrayList, String columnName) { int columnIndex = c.getColumnIndex(columnName); for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) { arrayList.add(c.getString(columnIndex)); }//from ww w .j a v a2 s. c o m } }