Hello
I'm using GestureDetector library V2.4
Just a question : I search to detect the end of a drag action.
OnDown is OK for the beginning but OnUp is missing ...
i use onTouch event with the Action_up action and call another sub to do some checking and then return true but it sometimes give me a exception
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference at flm.b4a.gesturedetector.GestureDetectorForB4A$1.onTouch(GestureDetectorForB4A.java:111) at android.view.View.dispatchTouchEvent(View.java:12536) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3153) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2829) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:601) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871) at android.app.Activity.dispatchTouchEvent(Activity.java:3384) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:563) at android.view.View.dispatchPointerEvent(View.java:12788) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5670) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5465) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4958) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5011) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4977):
Sub Gesture2_onTouch(Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
Try
If Action = Activity.ACTION_UP Then DragComplete
Catch
Log(LastException)
End Try
Return True
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.