Code example for Adapter

Methods: getItem

0
	 */ 
	public Object getSelectedItem() {
		T adapter = getAdapter();
		int selection = getSelectedItemPosition();
		if (adapter != null && adapter.getCount() > 0 && selection >= 0) {
			return adapter.getItem(selection);
		} else { 
			return null; 
		} 
	} 
 
	/** 
	 * @return The number of items owned by the Adapter associated with this 
	 *         AdapterView. (This is the number of data items, which may be 
	 *         larger than the number of visible view.) 
	 */ 
	@ViewDebug.CapturedViewProperty 
	public int getCount() { 
		return mItemCount;
	}