- Posts: 1123
- Thank you received: 73
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
PDFViewer3.15.3_Android Studio issue
IP: 111.196.240.223
7 years 6 months ago #14127
by radaee
Replied by radaee on topic PDFViewer3.15.3_Android Studio issue
this may caused by scroller value not updated.
i think it can be fixed by adding code:
m_scroller.computeScrollOffset();
at last line of PDFLayout.vSetPos()
so PDFLayout.vSetPos() shall be:
public void vSetPos(int vx, int vy, PDFPos pos) {
if (pos == null) return;
VPage vpage = m_pages[pos.pageno];
vSetX(vpage.GetVX(pos.x) - vx);
vSetY(vpage.GetVY(pos.y) - vy);
m_scroller.computeScrollOffset();
}
this code not confirmed. but i think it may helps.
i think it can be fixed by adding code:
m_scroller.computeScrollOffset();
at last line of PDFLayout.vSetPos()
so PDFLayout.vSetPos() shall be:
public void vSetPos(int vx, int vy, PDFPos pos) {
if (pos == null) return;
VPage vpage = m_pages[pos.pageno];
vSetX(vpage.GetVX(pos.x) - vx);
vSetY(vpage.GetVY(pos.y) - vy);
m_scroller.computeScrollOffset();
}
this code not confirmed. but i think it may helps.
- thiagopelikan
- Offline
- Junior Member
-
Less
More
- Posts: 36
- Thank you received: 0
IP: 177.194.85.78
4 years 10 months ago #15474
by thiagopelikan
Replied by thiagopelikan on topic PDFViewer3.15.3_Android Studio issue
Hi guys,
I'm using Android Radaee lib for almost 4 years and I've never see this happening until now. It seems that this strange behaviour occurs only on some Samsung Android 10. Unfourtunally I don´t have any device here to reproduce this bug. The lib I'm using is already using this m_scroller.computeScrollOffset(); at the end of SetPos method.
Is there anything I could do? I tried everything here at my devices and I couldn´t reproduce it.
Tks,
Thiago
I'm using Android Radaee lib for almost 4 years and I've never see this happening until now. It seems that this strange behaviour occurs only on some Samsung Android 10. Unfourtunally I don´t have any device here to reproduce this bug. The lib I'm using is already using this m_scroller.computeScrollOffset(); at the end of SetPos method.
Is there anything I could do? I tried everything here at my devices and I couldn´t reproduce it.
Tks,
Thiago
- DivinaPastora
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 0
IP: 52.169.220.34
4 years 10 months ago #15477
by DivinaPastora
Replied by DivinaPastora on topic PDFViewer3.15.3_Android Studio issue
The only way to fix the problem is restarting the device. Even closing the app doesn't fix the problem. I added the code above but didn't work so I think they will never fix it. It happens only in some devices and only after using the lib many times. Then the bug appears and only gets fixed restarting the device. Nothing else helps... so seems related to a c++ lib bug.
I think they can't reproduce it because it needs some time to appear. At first time it works without problem and happens "randomly". Then it happens while you press the screen while it is scrolling, it moves the view to the first page. If it isn't scrolling it doesn't happen.
Hope it helps...
I think they can't reproduce it because it needs some time to appear. At first time it works without problem and happens "randomly". Then it happens while you press the screen while it is scrolling, it moves the view to the first page. If it isn't scrolling it doesn't happen.
Hope it helps...
IP: 87.17.67.149
4 years 10 months ago #15481
by support
Replied by support on topic PDFViewer3.15.3_Android Studio issue
dear user, are you able to upload a short video to explain the issue?
you opened this old topic and I shall ask you to refresh some details.
you opened this old topic and I shall ask you to refresh some details.
IP: 87.17.67.149
4 years 10 months ago #15482
by support
Replied by support on topic PDFViewer3.15.3_Android Studio issue
It would be really weird if a native not-system library could someway corrupt the behavior of the Android framework and virtualmachine.
Are you able to give more details?
What's the device you're experiencing the bug?
Is the bug rising also using our demo project?
Are you able to give more details?
What's the device you're experiencing the bug?
Is the bug rising also using our demo project?
IP: 194.146.38.112
1 year 7 months ago #15902
by taagha
Replied by taagha on topic PDFViewer3.15.3_Android Studio issue
I found that the main issue comes from android.widget.Scroller. If the value of SystemClock.uptimeMillis() exceeds 25 days, on some devices, the value of AnimationUtils.currentAnimationTimeMillis() may sometimes exceed 2,200,000,000L. In the Scroller class, the value of AnimationUtils.currentAnimationTimeMillis() is occasionally cast to an int, which causes this bug. You should rewrite android Scroller and prevent from casting value of AnimationUtils.currentAnimationTimeMillis() to int.
to reproducing this bug you can rewrite Scroller and add AnimationUtils.currentAnimationTimeMillis() value with 2,200,000,000L and then you will see the bug.
to reproducing this bug you can rewrite Scroller and add AnimationUtils.currentAnimationTimeMillis() value with 2,200,000,000L and then you will see the bug.
Time to create page: 0.381 seconds