Code example for CursorAdapter

Methods: changeCursor

0
        if (getActivity() == null) { 
            return; 
        } 
        int token = loader.getId();
        if (token == VendorsQuery._TOKEN) {
            mAdapter.changeCursor(cursor);
 
        } else { 
            cursor.close();
        } 
    } 
 
    @Override 
    public void onLoaderReset(Loader<Cursor> cursor) {
    } 
 
    /** 
     * {@link CursorAdapter} that renders a {@link VendorsQuery}. 
     */ 
    private class VendorsAdapter extends CursorAdapter {
        public VendorsAdapter(Context context) {