- Posts: 11
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Fling plus tap snaps back to first page
IP: 192.168.0.71
8 years 3 months ago #13185
by spurgeon
Fling plus tap snaps back to first page was created by spurgeon
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
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
IP: 192.168.0.71
8 years 3 months ago #13186
by Davide
Replied by Davide on topic Fling plus tap snaps back to first page
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
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
IP: 192.168.0.71
8 years 3 months ago - 8 years 3 months ago #13195
by spurgeon
Replied by spurgeon on topic Fling plus tap snaps back to first page
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.
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.
Last edit: 8 years 3 months ago by spurgeon.
IP: 192.168.0.71
8 years 3 months ago #13196
by Davide
Replied by Davide on topic Fling plus tap snaps back to first page
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.
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.
Time to create page: 0.425 seconds