Android examples for Database:Cursor Get
get Boolean Value from Cursor
//package com.book2s; import android.database.Cursor; public class Main { public static boolean getBooleanValue(Cursor cursor, String columnName) { boolean value = false; final int columnIndex = cursor.getColumnIndex(columnName); if (columnIndex != -1) { final int rowValue = cursor.getInt(columnIndex); value = (rowValue != 0);/* w w w. j ava 2s. c o m*/ } return value; } }