- Posts: 100
- 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
zoom and pan getting cut
- asliyanage
- Topic Author
- Offline
- Premium Member
-
Less
More
IP: 192.168.0.71
11 years 3 months ago - 11 years 3 months ago #7957
by asliyanage
zoom and pan getting cut was created by asliyanage
I have viewpager with fragments.In each fragments i have one page pdf file.I used radaeepdf library to open a pdf files on each fragments.But when i try to zoom and pan to the edges of pdf file it moves to the next pdf page.but i i don't need to move to other page,i need to see the other part of the pdf file.
this is the page which is in normal
normal
This is the photo after i zoom the pdf and it hide the corners and i can see the next pdf edges.
zoomed
I think when i try to zoom and pan withing the pdf file viewpager think i am trying to move to next page.
this is the page which is in normal
normal
This is the photo after i zoom the pdf and it hide the corners and i can see the next pdf edges.
zoomed
I think when i try to zoom and pan withing the pdf file viewpager think i am trying to move to next page.
Last edit: 11 years 3 months ago by Docrishav.
IP: 192.168.0.158
11 years 3 months ago #7978
by nermeen
Replied by nermeen on topic zoom and pan getting cut
You need to block the viewpager navigation while zooming
- asliyanage
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 0
IP: 192.168.0.71
11 years 3 months ago #7982
by asliyanage
Replied by asliyanage on topic zoom and pan getting cut
this is not happen while zooming.After zooming i try to panning to see the cutting parts.When i try it vertically it works fine.I am able to see the all parts of pdf which are above and and below.But if i try to pan horizontally it trys to move to next page in view pager.I don't need to move until i see all parts of pdf which are hiddenHow to do this ?
IP: 192.168.0.158
11 years 3 months ago #7983
by nermeen
Replied by nermeen on topic zoom and pan getting cut
Sorry i meant You need to block the viewpager navigation when the zoom scale is > min scale (m_view.VGetScale > m_view.VGetMinScale)
The vertical scroll works because the viewpager does not handle the vertical gestures, the horizontal no as the viewpager has the priority to handle this kind of gestures, so you need to pass it to the pdf viewer.
The vertical scroll works because the viewpager does not handle the vertical gestures, the horizontal no as the viewpager has the priority to handle this kind of gestures, so you need to pass it to the pdf viewer.
- asliyanage
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 0
IP: 192.168.0.71
11 years 3 months ago - 11 years 3 months ago #7984
by asliyanage
Replied by asliyanage on topic zoom and pan getting cut
can you give a way to do this ?I mean ow to transfer the priority to pdf library from viewpager?
or is there a way to increase the size of fragment to adjust to zoomed pdf page.Then we can see the whole pdf without a problem?
Also i already customize the viewpager.So if the pdf is zoomed it disable the swipe to next page when try to move horizontally and if the pdf is in normal size it moves to next page when try to move horizontally.Is there a possibility do this ?
or is there a way to increase the size of fragment to adjust to zoomed pdf page.Then we can see the whole pdf without a problem?
Also i already customize the viewpager.So if the pdf is zoomed it disable the swipe to next page when try to move horizontally and if the pdf is in normal size it moves to next page when try to move horizontally.Is there a possibility do this ?
Last edit: 11 years 3 months ago by Docrishav.
- asliyanage
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 0
IP: 192.168.0.71
11 years 3 months ago #7987
by asliyanage
Replied by asliyanage on topic zoom and pan getting cut
finally i added below methos inside the PDFReader class.Then i am calling this method inside computeScroll() methos in PDFReader.Then i call this method from onInterceptTouchEvent in ViewPager and returns true or fasle based on resualt.
public void isPdfSwipeable() {
if (m_view.vGetScale() == m_view.vGetMinScale()) {
status= true;
} else {
status =false;
}
}
Now i am able to see whole pdf file when the file is zoomed.But the swipe is working only when the pdf is normal size.Because i returns false when the pdf is zoomed inside onInterceptTouchEvent.So i need to swipe when the pdf is zoomed and it comes to an edge.So how to identify that it comes to and end?
public void isPdfSwipeable() {
if (m_view.vGetScale() == m_view.vGetMinScale()) {
status= true;
} else {
status =false;
}
}
Now i am able to see whole pdf file when the file is zoomed.But the swipe is working only when the pdf is normal size.Because i returns false when the pdf is zoomed inside onInterceptTouchEvent.So i need to swipe when the pdf is zoomed and it comes to an edge.So how to identify that it comes to and end?
Time to create page: 0.423 seconds