Code example for SimpleCursorAdapter

Methods: getItem

0
	 */ 
	@Override 
	public View getView(int position, View convertView, ViewGroup parent) {
 
		CardView i;
		Cursor item = (Cursor) getItem(position);
 
		if (convertView instanceof CardView) {
			i = (CardView) convertView;
			i.setLayoutParams(new Gallery.LayoutParams(width, height));
		} else { 
			i = new CardView(mContext);
			/* Set the Width/Height of the ImageView. */ 
			i.setLayoutParams(new Gallery.LayoutParams(width, height));
		} 
		i.setItem(new ItemCardCursor(item));
		return i;
	} 
 
	/** 
	 * Returns the size (0.0f to 1.0f) of the views