Android examples for Database:Cursor Get
get Cursor Boolean Value
//package com.java2s; import android.database.Cursor; public class Main { public static boolean getCursorBooleanValue(String ColumnName, Cursor cursor) {// ww w. j av a 2 s .c o m int col = cursor.getColumnIndex(ColumnName); if (col != -1 && !cursor.isNull(col)) { return cursor.getInt(col) != 0; } else { return false; } } }