[Xamarin - Android] How can i use onScrollChanged and onScale

48 views
Skip to first unread message

Kien Vuong

unread,
Sep 22, 2014, 10:15:29 PM9/22/14
to pdfne...@googlegroups.com
Hi, I want to use event onScrollChanged and onScale but in PdfViewCtrlTool I just found few listener like onMove, onUp.
Please tell me how can i find onScrollChanged or how can i override it on Tools.
Thank you!

Ryan

unread,
Sep 30, 2014, 5:21:37 PM9/30/14
to pdfne...@googlegroups.com

To get the touch position start with PreToolManagerListener.onSingleTapConfirmed method in ToolManager.java file. Once you have the touch position, which will be in screen coordinates, you would call PDFViewCtrl.convScreenPtToPagePt To get the coordinates in the particular PDF page. From there you can match up the page coordinates with your map marker.

PDFViewCtrl.convScreenPtToPagePt will handle all page transformations, including layout, zoom, position, rotation, etc.

onScrollChanged and onScale are not currently "exposed". However, as we do provide the source code for customization, you could expose these by following how the same pattern as onMove/onScaleBegin are done.

Reply all
Reply to author
Forward
0 new messages