Each instance of GestureDetector is bound to a view so I don't really understand why you need to know who sent the event. That cannot be another view that the one you bound to GD. If you share the GD among different views, it's a mistake. 1 GD = 1 View.The code is yours code exact but i use the Sender to get the button to rotate.
Sub TableGesture_onRotation(Degrees As Double, MotionEvent As Object) If Debug Then Log("TableGesture_onRotation(Degrees = " & Degrees & ", MotionEvent=" & MotionEvent & ")") Dim TableToRotate As Button TableToRotate = Sender Dim Angle As Float = Degrees Dim jo = TableToRotate As JavaObject jo.RunMethod("setRotation", Array As Object(Angle)) End Sub
Here is the logfile, i press on the bottom left and the top right corners, and the image rotate like a propeller.