Hello there
I am an Android developer and I am having problems when I integrate the SDK.
When I quickly drag the page and then touch to stop the page scrolling, the page will immediately jump to the first page, why not stop the page to scroll, such as 4, 5, 6 pages, etc.
I hope you can help me solve this problem, thank you!
The specific issues are as follows:
The red part of the following code "this.vGetPage(this.m_w / 4, this.m_h / 4)" gets 0 when dragging, causing the above scene to appear;
verson:PDFViewer3.15.3_Android Studio
code:
com.radaee.view.jar
\com\radaee\view\PDFLayout.class
protected void vFlushRange() {
int pageno1 = this.vGetPage(0, 0);
int pageno2 = this.vGetPage(this.m_w, this.m_h);
int start;
int end;
VPage vpage;
if (pageno1 >= 0 && pageno2 >= 0) {
if (pageno1 > pageno2) {
start = pageno1;
pageno1 = pageno2;
pageno2 = start;
}
++pageno2;
if (this.m_disp_page1 < pageno1) {
start = this.m_disp_page1;
end = pageno1;
if (pageno1 > this.m_disp_page2) {
end = this.m_disp_page2;
}
while(start < end) {
vpage = this.m_pages[start];
vpage.vEndPage(this.m_thread);
++start;
}
}
if (this.m_disp_page2 > pageno2) {
start = pageno2;
end = this.m_disp_page2;
if (pageno2 < this.m_disp_page1) {
start = this.m_disp_page1;
}
while(start < end) {
vpage = this.m_pages[start];
vpage.vEndPage(this.m_thread);
++start;
}
}
} else {
start = this.m_disp_page1;
for(end = this.m_disp_page2; start < end; ++start) {
vpage = this.m_pages[start];
vpage.vEndPage(this.m_thread);
}
}
this.m_disp_page1 = pageno1;
this.m_disp_page2 = pageno2;
pageno1 = this.vGetPage(this.m_w / 4, this.m_h / 4);
if (this.m_listener != null && pageno1 != this.m_pageno) {
this.m_listener.OnPageChanged(this.m_pageno = pageno1);
}
if (this.m_cache_use) {
this.vFlushCacheRange();
}
}