// --------------------------------------------------------- #region Private Methods private async Task InitializeRenderer(PhotoView view, string filePath) { // Create the Photo View _photoView = new PhotoViewDroid(this.Context); _photoViewAttacher = _photoView.GetPhotoViewDroidAttacher(); _photoViewAttacher.SetOnViewTapListener(this); // Prepare the image var options = await GetBitmapOptionsOfImageAsync(filePath); var bitmapToDisplay = await LoadScaledDownBitmapForDisplayAsync(Resources, filePath, options, MAX_IMAGE_SIZE_WIDTH, MAX_IMAGE_SIZE_HEIGHT); // Set the scroll view as the native control this.SetNativeControl(_photoView); // Set the image this.Control.SetImageBitmap(bitmapToDisplay); }
public void SetOnViewTapListener(PhotoViewDroidAttacher.IOnViewTapListener listener) { mAttacher.SetOnViewTapListener(listener); }