Android examples for Database:Cursor Column
Return the string at the specified column of the cursor
import java.io.Closeable; import java.io.IOException; import android.database.Cursor; public class Main{ /** Return the string at the specified column of the cursor */ public static String getString(Cursor cursor, DatabaseColumn column) { int index = cursor.getColumnIndex(column.getName()); return (index != -1) ? cursor.getString(index) : ""; }/*from w w w . j a v a 2 s .c o m*/ }