Exemple #1
0
 public void OnScrollEnd(MotionEvent e)
 {
     pdfView.LoadPages();
     HideHandle();
     if (!animationManager.IsFlinging())
     {
         pdfView.PerformPageSnap();
     }
 }
Exemple #2
0
 public void StartZoomAnimation(float centerX, float centerY, float zoomFrom, float zoomTo)
 {
     StopAll();
     animation = ValueAnimator.OfFloat(zoomFrom, zoomTo);
     animation.SetInterpolator(new DecelerateInterpolator());
     animation.Update += (s, e) =>
     {
         pdfView.ZoomCenteredTo((float)e.Animation.AnimatedValue, new PointF(centerX, centerY));
     };
     animation.AnimationEnd += (s, e) =>
     {
         pdfView.LoadPages();
         if (pdfView.ScrollHandle != null)
         {
             pdfView.ScrollHandle.HideDelayed();
         }
         pdfView.PerformPageSnap();
     };
     animation.SetDuration(400);
     animation.Start();
 }