RadaeePDF.com :: Topic: In zoomed state stop fling gesture to next page (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: In zoomed state stop fling gesture to next page

In zoomed state stop fling gesture to next page 3 years 9 months ago #5169

  • rohitks
  • rohitks's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
1) Use def_view = 3
2) Zoom a specific page to more than300 %
3) In above scenario, user can perform the following actions:
a) user can scroll within the page (panning).
b) User can change the page through page thumbnails.
c) User can also fling the page to go to next page.
It is required to avoid "c) User can also fling the page to go to next page."
i.e. User should not be allowed to fling the page to go to next page in such scenario.

Please help us and suggest appropriate resolution.
The administrator has disabled public write access.

In zoomed state stop fling gesture to next page 3 years 9 months ago #5187

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 709
  • Thank you received: 49
  • Karma: 18
You need to change the behavior in PDFViewDual.vOnFling(float, float, float, float) .. add a check on the scale level m_scale
The administrator has disabled public write access.

In zoomed state stop fling gesture to next page 3 years 9 months ago #5216

  • SONAWANE
  • SONAWANE's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
You can do that by adding one condition in "PDFGestureListener" class which you can find in "PDFView"

just replace code from below


earlier


if (vOnFling(dx, dy, velocityX, velocityY)) {
m_status = STA_NONE;
if (m_listener != null)
m_listener.OnPDFInvalidate(false);
return true;
} else
return false;


change with


if (vGetMinScale() == vGetScale())
if (vOnFling(dx, dy, velocityX, velocityY)) {
m_status = STA_NONE;
if (m_listener != null)
m_listener.OnPDFInvalidate(false);
return true;
} else
return false;
else
return false;
The administrator has disabled public write access.

In zoomed state stop fling gesture to next page 2 years 9 months ago #8335

  • alex.temp
  • alex.temp's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
Hi, I cannot edit the PDFView as I'm using the standard version.
Any other way to solve this without editing the PDFView?
The administrator has disabled public write access.
Powered by Kunena Forum