Exemple #1
0
 public bool OnScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
 {
     scrolling = true;
     if (pdfView.IsZooming || pdfView.IsSwipeEnabled)
     {
         pdfView.MoveRelativeTo(-distanceX, -distanceY);
     }
     if (!scaling || pdfView.RenderDuringScale)
     {
         pdfView.LoadPageByOffset();
     }
     return(true);
 }
Exemple #2
0
 public void StartYAnimation(float yFrom, float yTo)
 {
     StopAll();
     animation = ValueAnimator.OfFloat(yFrom, yTo);
     animation.SetInterpolator(new DecelerateInterpolator());
     animation.AnimationCancel += (s, e) =>
     {
         pdfView.LoadPages();
         pageFlinging = false;
     };
     animation.Update += (s, e) =>
     {
         pdfView.MoveTo(pdfView.CurrentXOffset, (float)e.Animation.AnimatedValue);
         pdfView.LoadPageByOffset();
     };
     animation.AnimationEnd += (s, e) =>
     {
         pdfView.LoadPages();
         pageFlinging = false;
     };
     animation.SetDuration(400);
     animation.Start();
 }