public bool OnSingleTapConfirmed(Android.Views.MotionEvent e) { if (this.photoViewAttacher == null) { return(false); } ImageView imageView = photoViewAttacher.GetImageView(); if (null != photoViewAttacher.GetOnPhotoTapListener()) { RectF displayRect = photoViewAttacher.GetDisplayRect(); if (null != displayRect) { float x = e.GetX(), y = e.GetY(); if (displayRect.Contains(x, y)) { float xResult = (x - displayRect.Left) / displayRect.Width(); float yResult = (y - displayRect.Top) / displayRect.Height(); photoViewAttacher.GetOnPhotoTapListener().OnPhotoTap(imageView, xResult, yResult); return(true); } } } if (null != photoViewAttacher.GetOnViewTapListener()) { photoViewAttacher.GetOnViewTapListener().OnViewTap(imageView, e.GetX(), e.GetY()); } return(false); }
public PhotoViewAttacher.IOnPhotoTapListener GetOnPhotoTapListener() { return(mAttacher.GetOnPhotoTapListener()); }