Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Fling plus tap snaps back to first page 6 years 4 months ago #13185

  • spurgeon
  • spurgeon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 0
We're testing 3.14.4 and noticed that when we fling a PDF (to scroll quickly) and then single tap while it's scrolling, the activity always snaps back to the first page. However, if we let the fling stop scrolling and then single tap, it does not snap to the first page. Is this a known issue, or is it perhaps just us? We have made some minor edits to the sources, but nothing we think would cause this.

I've exposed some logging that helps illustrate what's happening. I fling and then single tap when it hits page 11. Then it snaps back to page 1.

12-04 15:12:07.122 29282-29282/com.myactivity D/PDFLayoutView: onFling
12-04 15:12:07.123 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 2
12-04 15:12:07.159 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 3
12-04 15:12:07.197 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 4
12-04 15:12:07.253 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 5
12-04 15:12:07.290 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 6
12-04 15:12:07.358 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 7
12-04 15:12:07.395 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 8
12-04 15:12:07.464 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 9
12-04 15:12:07.541 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 10
12-04 15:12:07.622 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 11
12-04 15:12:07.720 29282-29282/com.myactivity D/PDFLayoutView: onTouchEvent:MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=490.0, y[0]=881.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=2174155030, downTime=2174155030, deviceId=7, source=0x1002 }
12-04 15:12:07.723 29282-29282/com.myactivity D/PDFActivity: OnPDFPageChanged: 1
12-04 15:12:07.853 29282-29282/com.myactivity D/PDFLayoutView: onTouchEvent:MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=490.0, y[0]=881.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=2174155170, downTime=2174155030, deviceId=7, source=0x1002 }
12-04 15:12:08.030 29282-29282/com.myactivity D/PDFLayoutView: onSingleTapConfirmed
12-04 15:12:08.030 29282-29282/com.myactivity D/PDFActivity: OnPDFBlankTapped

Please Log in or Create an account to join the conversation.

Fling plus tap snaps back to first page 6 years 4 months ago #13186

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
we have checked it and we can't find the issue.
Can you reproduce it with the last beta version? www.radaeepdf.com/download/download-prev...e/66-radaeepdf-3145b

Please Log in or Create an account to join the conversation.

Fling plus tap snaps back to first page 6 years 4 months ago #13195

  • spurgeon
  • spurgeon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 0
I upgraded to 3.14.5beta3 but still noticed the issue on my Nexus 5X (API 25). However, I restarted the phone and the issue went away. I don't know what to make of it, and perhaps it was simply something going on with the phone. Or, maybe it was stale data or code that remained in the .apk when Android Studio updated it.

Still, I would like to press a little further because we had one user mention this issue a while ago in production, and I wasn't able to reproduce it then. Are there any conditions where the PDF resets or snaps the position back to the first page? Perhaps if something happens to the touch or page states, or if there are resource constraints on the phone (that could have been freed up when I restarted the phone)? I realize that this is a bit of an open ended question, but if you have any insights, I'd appreciate it.

Please Log in or Create an account to join the conversation.

Last edit: by spurgeon.

Fling plus tap snaps back to first page 6 years 4 months ago #13196

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
no, there is no condition where the PDF resets the position back to the first page.

If it happens again try to use different devices/pdfs (to understand if it's systematic) with latest library version, and to use the demo project to be able to reproduce the issue.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum