get database Cursor Column As Int - Android Database

Android examples for Database:Cursor Column

Description

get database Cursor Column As Int

Demo Code


//package com.java2s;

import android.database.Cursor;

public class Main {
    public static int getColumnAsInt(Cursor c, String columnName) {
        int index = c.getColumnIndex(columnName);
        return c.getInt(index);
    }//from  w w  w. j  a  v  a2 s.  c  o m
}

Related Tutorials