Exemplo n.º 1
0
 public Builder EnableImmersiveMode(bool enable)
 {
     CheckNotDisposed();
     if (Config == null)
     {
         Config = new ViewerConfig();
     }
     this.Config.ImmersiveModeEnabled = enable;
     return(this);
 }
Exemplo n.º 2
0
 public Builder AnimateZooming(bool animate)
 {
     CheckNotDisposed();
     if (Config == null)
     {
         Config = new ViewerConfig();
     }
     this.Config.ZoomAnimationEnabled = animate;
     return(this);
 }
 public ZoomableTouchListener(ITargetContainer targetContainer, View view, ViewerConfig config, IInterpolator interpolator, IZoomListener zoomListener, ITapListener tapListener, ILongPressListener longPressListener, IDoubleTapListener doubleTapListener)
 {
     this.TargetContainer        = targetContainer;
     this.Target                 = view;
     this.Config                 = config;
     this.EndZoomingInterpolator = interpolator ?? new AccelerateDecelerateInterpolator();
     this.ScaleGestureDetector   = new ScaleGestureDetector(view.Context, this);
     this.GestureDetector        = new GestureDetector(view.Context, GestureListener);
     this.ZoomListener           = zoomListener;
     this.TapListener            = tapListener;
     this.LongPressListener      = longPressListener;
     this.DoubleTapListener      = doubleTapListener;
     GestureListener             = new GestureDetectorGestureListener(this);
     EndingZoomAction            = new ZoomAction(this);
 }
Exemplo n.º 4
0
 public void Register()
 {
     CheckNotDisposed();
     if (Config == null)
     {
         Config = DefaultConfig;
     }
     if (TargetContainer == null)
     {
         throw new IllegalArgumentException("Target container must not be null");
     }
     if (TargetView == null)
     {
         throw new IllegalArgumentException("Target view must not be null");
     }
     TargetView.SetOnTouchListener(new ZoomableTouchListener(TargetContainer, TargetView,
                                                             Config, ZoomInterpolator, ZoomListener, TapListener, LongPressListener,
                                                             DoubleTapListener));
     mDisposed = true;
 }