Code example for Gallery

Methods: getAdapter, getSelectedItemPosition

0
		case MotionEvent.ACTION_MOVE:
			break; 
		case MotionEvent.ACTION_UP:
			if (eventY < pointY) {
				if (slider.isOpened()) {
					CardView ca = ((ImageAdapter) gallery.getAdapter())
							.getCardView(gallery.getSelectedItemPosition(),
								null, null); 
					getEm().setSelectedCardHand(ca.getCard().get_Id());
					getEm().setSelectedCardHandUID(ca.getCard().getUid());
					slider.animateClose();
					pointY = 0;
				} 
			} 
			break; 
		default: 
			return false; 
		} 
		return false; 
	}