Code example for Cursor

Methods: getCountmoveToFirst

0
            null); 
    } 
 
    @Override 
    public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
        if (0 >= data.getCount()) { return; }
        cursor = data;
        populateFields(); 
    } 
 
    @Override 
    public void onLoaderReset(Loader<Cursor> loader) {
        cursor = null;
    } 
 
    public void populateFields() { 
        if (null == cursor) { return; }
        cursor.moveToFirst();
        details.populateFields(cursor, from, to);
    } 
}