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; 
		} 
	} 
 
	public int getCount() { 
		return mItemCount;
	} 
 
	public int getPositionForView(View view) {
		View listItem = view;
		try { 
			View v;
			while (!(v = (View) listItem.getParent()).equals(this)) {
				listItem = v;