B4J Question [SOLVED] Manage the Touch or MouseDragged

Star-Dust

Expert
Licensed User
Longtime User
In B4A I use this code to handle the event of touch and drag of views.

B4X:
Dim obj As Reflector
obj.Target = EditText2
obj.SetOnTouchListener("View_Touch")
' after
Sub View_Touch(viewtag As Object, action As Int, X As Float, Y As Float, motionevent As Object) As Boolean
    Return True
End Sub
Is there something that matches in B4J?
I would like to handle the Mouse Click event and dragging.

I have been suggested to use similar code,
B4X:
Dim jo As JavaObject = View
Dim e As Object = jo.CreateEvent("javafx.event.EventHandler", "View", False)
jo.RunMethod("setOnTouchMoved", Array(e))
' after ???
Sub View( ? ) 

End Sub
but I have some difficulties.
 
Top