Code example for CursorAdapter

Methods: getCursor, notifyDataSetChanged

0
    public void onNothingSelected(AdapterView<?> parent) {
    } 
 
    @Override 
    public void notifyDataSetChanged() { 
        super.notifyDataSetChanged(); 
 
        // Pre-fetch album covers 
        Cursor cursor = getCursor();
        mImageLoader.prefetch(cursor, COLUMN_ALBUM_IMAGE);
    } 
 
    private String getString(Object item, int columnIndex) {
        Cursor cursor = getCursor();
        if (item == cursor) {
            return cursor.getString(columnIndex);
        } else { 
            return null; 
        } 
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE