RadaeePDF.com :: Topic: which method runs the when the pdf zooming using t (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: which method runs the when the pdf zooming using t

which method runs the when the pdf zooming using t 2 years 11 months ago #7911

  • asliyanage
  • asliyanage's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 100
  • Karma: 0
I try to use Radaee pdf library 3.1.When i try to zoom the pdf using and when i remove the fingers from the screen it automatically comes to the normal size.I don't know why it happens.Could you please tell me why this happen?
The administrator has disabled public write access.

which method runs the when the pdf zooming using t 2 years 11 months ago #7924

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 709
  • Thank you received: 49
  • Karma: 18
Are you using the demo project, or your modified version?
Can you replicate this with the demo project?
The administrator has disabled public write access.

which method runs the when the pdf zooming using t 2 years 11 months ago #7996

  • asliyanage
  • asliyanage's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 100
  • Karma: 0
I works fine when i used in my project.Then i add a Horizontal List View to the my app.Then it gives me this problem.I don't know why?I think it gives me this problem when we add another view to the mail view.Also i have already overrides the onIntercepTouchEvent method.
If i tried several times i am getting below exception and app crashes.
12-08 18:49:32.688: E/InputEventReceiver(22797): Exception dispatching input event.
12-08 18:49:32.688: E/MessageQueue-JNI(22797): Exception in MessageQueue callback: handleReceiveCallback
12-08 18:49:32.718: E/MessageQueue-JNI(22797): java.lang.IllegalArgumentException: pointerIndex out of range
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.MotionEvent.nativeGetAxisValue(Native Method)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.MotionEvent.getX(MotionEvent.java:2225)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.support.v4.view.MotionEventCompatEclair.getX(MotionEventCompatEclair.java:32)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.support.v4.view.MotionEventCompat$EclairMotionEventVersionImpl.getX(MotionEventCompat.java:91)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.support.v4.view.MotionEventCompat.getX(MotionEventCompat.java:219)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:1839)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at com.sph.custom.ViewPagerWithTapGestreDetection.onInterceptTouchEvent(ViewPagerWithTapGestreDetection.java:128)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2477)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2209)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2477)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2209)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2477)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2209)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2477)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2209)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2332)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1616)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.app.Activity.dispatchTouchEvent(Activity.java:2665)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2280)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.View.dispatchPointerEvent(View.java:8489)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4890)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4741)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4295)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4349)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4318)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4429)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4326)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4486)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4295)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4349)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4318)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4326)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4295)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6705)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6584)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6555)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6520)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6785)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.os.MessageQueue.nativePollOnce(Native Method)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.os.MessageQueue.next(MessageQueue.java:138)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.os.Looper.loop(Looper.java:131)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at android.app.ActivityThread.main(ActivityThread.java:5748)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at java.lang.reflect.Method.invokeNative(Native Method)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at java.lang.reflect.Method.invoke(Method.java:515)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
12-08 18:49:32.718: E/MessageQueue-JNI(22797): at dalvik.system.NativeStart.main(Native Method)
12-08 18:49:32.718: D/AndroidRuntime(22797): Shutting down VM
12-08 18:49:32.728: W/dalvikvm(22797): threadid=1: thread exiting with uncaught exception (group=0x4184eda0)
12-08 18:49:32.728: E/AndroidRuntime(22797): FATAL EXCEPTION: main
12-08 18:49:32.728: E/AndroidRuntime(22797): Process: com.example.wtest, PID: 22797
12-08 18:49:32.728: E/AndroidRuntime(22797): java.lang.IllegalArgumentException: pointerIndex out of range
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.MotionEvent.nativeGetAxisValue(Native Method)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.MotionEvent.getX(MotionEvent.java:2225)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.support.v4.view.MotionEventCompatEclair.getX(MotionEventCompatEclair.java:32)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.support.v4.view.MotionEventCompat$EclairMotionEventVersionImpl.getX(MotionEventCompat.java:91)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.support.v4.view.MotionEventCompat.getX(MotionEventCompat.java:219)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:1839)
12-08 18:49:32.728: E/AndroidRuntime(22797): at com.sph.custom.ViewPagerWithTapGestreDetection.onInterceptTouchEvent(ViewPagerWithTapGestreDetection.java:128)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2107)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2477)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2209)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2477)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2209)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2477)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2209)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2477)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2209)
12-08 18:49:32.728: E/AndroidRuntime(22797): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2332)
12-08 18:49:32.728: E/AndroidRuntime(22797): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1616)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.app.Activity.dispatchTouchEvent(Activity.java:2665)
12-08 18:49:32.728: E/AndroidRuntime(22797): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2280)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.View.dispatchPointerEvent(View.java:8489)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4890)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4741)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4295)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4349)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4318)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4429)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4326)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4486)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4295)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4349)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4318)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4326)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4295)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6705)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6584)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6555)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6520)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6785)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.os.MessageQueue.nativePollOnce(Native Method)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.os.MessageQueue.next(MessageQueue.java:138)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.os.Looper.loop(Looper.java:131)
12-08 18:49:32.728: E/AndroidRuntime(22797): at android.app.ActivityThread.main(ActivityThread.java:5748)
12-08 18:49:32.728: E/AndroidRuntime(22797): at java.lang.reflect.Method.invokeNative(Native Method)
12-08 18:49:32.728: E/AndroidRuntime(22797): at java.lang.reflect.Method.invoke(Method.java:515)
12-08 18:49:32.728: E/AndroidRuntime(22797): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
12-08 18:49:32.728: E/AndroidRuntime(22797): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
12-08 18:49:32.728: E/AndroidRuntime(22797): at dalvik.system.NativeStart.main(Native Method)
Last Edit: 2 years 11 months ago by Docrishav.
The administrator has disabled public write access.

which method runs the when the pdf zooming using t 2 years 11 months ago #8015

  • asliyanage
  • asliyanage's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 100
  • Karma: 0
hi Radaee,
can you please tell me when is the onSizeChanged method run?
because i add some logs inside the PDFReader class and check in both scenarios.

1)Without Thumnails
12-09 09:49:56.697: E/SAMEERA(20357): ACTION_DOWN
12-09 09:49:56.697: D/SAMEERA(20357): ACTION_DOWN

12-09 09:49:56.747: E/SAMEERA(20357): ComputeScroll 1.199803
12-09 09:49:56.767: E/SAMEERA(20357): ComputeScroll 1.199803
12-09 09:49:56.777: E/SAMEERA(20357): ComputeScroll 1.199803
12-09 09:49:56.787: E/SAMEERA(20357): ACTION_UP
12-09 09:49:56.787: E/SAMEERA(20357): tapDetected ELSEEEE

12-09 09:49:56.787: E/SAMEERA(20357): tapDetectedtapDetected true
12-09 09:49:56.787: E/SAMEERA(20357): OnPDFSingleTapped
12-09 09:49:56.797: E/SAMEERA(20357): ComputeScroll 1.199803
12-09 09:49:56.877: E/SAMEERA(20357): ACTION_DOWN
12-09 09:49:56.877: D/SAMEERA(20357): ACTION_DOWN

12-09 09:49:56.897: E/SAMEERA(20357): OnPDFDoubleTapped
12-09 09:49:56.897: E/SAMEERA(20357): OnPDFDoubleTapped IFF 9.598424
12-09 09:49:56.917: E/SAMEERA(20357): ComputeScroll 9.598424
12-09 09:49:56.927: E/SAMEERA(20357): ComputeScroll 9.598424
12-09 09:49:56.957: E/SAMEERA(20357): ACTION_UP
12-09 09:49:56.957: E/SAMEERA(20357): tapDetected IFFFFF
12-09 09:49:56.957: E/SAMEERA(20357): tapDetectedtapDetected false

12-09 09:50:01.247: E/SAMEERA(20357): ComputeScroll 9.598424
12-09 09:50:01.277: E/SAMEERA(20357): ComputeScroll 9.598424
2) With thumbnails
12-09 09:54:42.607: E/SAMEERA(20619): ComputeScroll 1.199803
12-09 09:54:42.627: E/SAMEERA(20619): ComputeScroll 1.199803
12-09 09:54:42.637: E/SAMEERA(20619): ComputeScroll 1.199803
12-09 09:54:42.667: E/SAMEERA(20619): ACTION_UP
12-09 09:54:42.667: E/SAMEERA(20619): tapDetected ELSEEEE
12-09 09:54:42.667: E/SAMEERA(20619): tapDetectedtapDetected true

12-09 09:54:42.667: E/SAMEERA(20619): OnPDFSingleTapped
12-09 09:54:42.667: E/SAMEERA(20619): +++++++++++++++++++++++++++++++++++++++++++++
12-09 09:54:42.767: E/SAMEERA(20619): onSizeChanged 959 1.199803
12-09 09:54:42.767: E/SAMEERA(20619): +++++++++++++++++++++++++++++++++++++++++++++
12-09 09:54:42.767: E/SAMEERA(20619): +++++++++++++++++++++++++++++++++++++++++++++
12-09 09:54:42.867: E/SAMEERA(20619): onSizeChanged 959 1.199803
12-09 09:54:42.867: E/SAMEERA(20619): +++++++++++++++++++++++++++++++++++++++++++++
12-09 09:54:42.867: E/SAMEERA(20619): ComputeScroll 1.199803
12-09 09:54:42.877: E/SAMEERA(20619): ACTION_DOWN
12-09 09:54:42.877: D/SAMEERA(20619): ACTION_DOWN

12-09 09:54:42.877: E/SAMEERA(20619): OnPDFDoubleTapped
12-09 09:54:42.877: E/SAMEERA(20619): OnPDFDoubleTapped IFF 9.598424
12-09 09:54:42.887: E/SAMEERA(20619): ACTION_UP
12-09 09:54:42.887: E/SAMEERA(20619): tapDetected IFFFFF
12-09 09:54:42.887: E/SAMEERA(20619): tapDetectedtapDetected false

12-09 09:54:42.887: E/SAMEERA(20619): +++++++++++++++++++++++++++++++++++++++++++++
12-09 09:54:42.897: E/SAMEERA(20619): onSizeChanged 959 1.199803
12-09 09:54:42.897: E/SAMEERA(20619): +++++++++++++++++++++++++++++++++++++++++++++
12-09 09:54:42.907: E/SAMEERA(20619): +++++++++++++++++++++++++++++++++++++++++++++
12-09 09:54:42.927: E/SAMEERA(20619): onSizeChanged 959 1.199803
12-09 09:54:42.927: E/SAMEERA(20619): +++++++++++++++++++++++++++++++++++++++++++++
12-09 09:54:42.927: E/SAMEERA(20619): ComputeScroll 1.199803
12-09 09:54:42.947: E/SAMEERA(20619): ComputeScroll 1.199803
12-09 09:54:42.947: E/SAMEERA(20619): ComputeScroll 1.199803
12-09 09:54:42.957: E/SAMEERA(20619): ComputeScroll 1.199803
12-09 09:54:43.397: E/SAMEERA(20619): ComputeScroll 1.199803
12-09 09:54:43.417: E/SAMEERA(20619): ComputeScroll 1.199803
So when the thumbnails are visible it automatically calls the onSizeChanged method and re-sized the pdf.
In first case after i double clicked the pdf size is comes to maximum and it doesn't change.But in second case it comes to maximum size and then automatically called the onSizeChanged and resized it.Could you please help me to handle this issue?

If i comment the onSizeChanged methos body does it effect to the pdf reader class?
Note: Colored methods are in Viewpager and my activity methods.
Last Edit: 2 years 11 months ago by Docrishav.
The administrator has disabled public write access.
Powered by Kunena Forum