I'm sorry to get an error message, when I tested the project of 'GestureDetector_Dispatch'.
If i click the green panel, it raises :
Code:
Sub GD_Green_onTouch(Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
Log("GREEN_Touch action=" & Action & ", x=" & X & ", y=" & Y & ", ev=" & MotionEvent)
Return GD_Green.PassTouchEventTo(MotionEvent, pnlRed)
End Sub
GREEN_Touch action=0, x=119, y=94, ev=MotionEvent{b66f62a0 action=0 x=119.0 y=94.0 pressure=1.0 size=0.0}
Unexpected event (missing RaiseSynchronousEvents): gd_red_ontouch
Check the unfiltered logs for the full stack trace.
Error occurred on line: 61 (main)
java.lang.NullPointerException
at flm.b4a.gesturedetector.GestureDetectorForB4A$1.onTouch(GestureDetectorForB4A.java:111)
at android.view.View.dispatchTouchEvent(View.java:3881)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903)
at flm.b4a.gesturedetector.GestureDetectorForB4A.PassTouchEventTo(GestureDetectorForB4A.java:412)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:485)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:154)
at flm.b4a.gesturedetector.GestureDetectorForB4A$1.onTouch(GestureDetectorForB4A.java:111)
at android.view.View.dispatchTouchEvent(View.java:3881)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869)
OP: android 2.3