E ernschd Active Member Licensed User Longtime User Jan 20, 2014 #1 Hi, is there any opportunity to call the following methods from the MotionEvent (used by OnTouch)? B4X: getHistorySize() getHistoricalX(int) getHistoricalY(int) Maybe using reflection? Thanks.
Hi, is there any opportunity to call the following methods from the MotionEvent (used by OnTouch)? B4X: getHistorySize() getHistoricalX(int) getHistoricalY(int) Maybe using reflection? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Jan 20, 2014 #2 You can use Reflector.SetOnTouchListener: http://www.b4x.com/android/help/reflection.html#reflector_setontouchlistener You can then access these methods with reflector or with JavaObject: B4X: Dim jo As JavaObject = motionevent Log(jo.RunMethod("getHistorySize", null)) Log(jo.RunMethod("getHistoricalX", Array As Object(0)) Upvote 0
You can use Reflector.SetOnTouchListener: http://www.b4x.com/android/help/reflection.html#reflector_setontouchlistener You can then access these methods with reflector or with JavaObject: B4X: Dim jo As JavaObject = motionevent Log(jo.RunMethod("getHistorySize", null)) Log(jo.RunMethod("getHistoricalX", Array As Object(0))
E ernschd Active Member Licensed User Longtime User Jan 21, 2014 #3 Works perfect! Thank you Upvote 0