Code example for SimpleCursorAdapter

Methods: getCursor

0
		} 
		super.bindView(view, context, cursor);
	} 
 
	public void closeCursor() { 
		final Cursor cursor = getCursor();
		if (cursor == null) return;
		if (!cursor.isClosed()) {
			cursor.close();
		} 
	} 
 
	@Override 
	public CharSequence convertToString(final Cursor cursor) {
		if (isCursorClosed()) return null; 
		return cursor.getString(mScreenNameIdx != -1 ? mScreenNameIdx : mNameIdx);
	} 
 
	public boolean isCursorClosed() { 
		final Cursor cursor = getCursor();
		return cursor == null || cursor.isClosed();