Hi dear Alexander.
I don't know how as_view works (I haven't looked at the library).
And I don't know if these two examples can help you.
I have prepared 2 examples for you:
The former intercepts whether the mouse is inside the object or if it is outside the object. You could eventually "stop" the gesture capability inside as_view.
The second intercept right if you use the SWIPE (trackpad) to the right or left
I don't know how as_view works (I haven't looked at the library).
And I don't know if these two examples can help you.
I have prepared 2 examples for you:
The former intercepts whether the mouse is inside the object or if it is outside the object. You could eventually "stop" the gesture capability inside as_view.
B4X:
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
'First Example if the mouse is inside the object ( example calendar )
Dim JO As JavaObject = Pane1 'or Whichever Node you are tracking
Dim O As Object = JO.CreateEventFromUI("javafx.event.EventHandler","MouseEntered",Null)
JO.RunMethod("setOnMouseEntered",Array(O))
Dim O As Object = JO.CreateEventFromUI("javafx.event.EventHandler","MouseExited",Null)
JO.RunMethod("setOnMouseExited",Array(O))
End Sub
Private Sub MouseEntered_Event (MethodName As String, Args() As Object)
Log("Mouse inside")
End Sub
Private Sub MouseExited_Event (MethodName As String, Args() As Object)
Log("Mouse Out")
End Sub
The second intercept right if you use the SWIPE (trackpad) to the right or left
B4X:
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
'Next Example if SWIPE LEFT O RIGHT
Dim R As Reflector
R.Target = MainForm.RootPane
R.AddEventFilter("SwipeLeft","javafx.scene.input.SwipeEvent.SWIPE_LEFT")
R.AddEventFilter("SwipeRight","javafx.scene.input.SwipeEvent.SWIPE_RIGHT")
End Sub
Private Sub SwipeLeft_Filter (E As Event)
Dim MouseEvent As JavaObject = E
Log("SWIPE_LEFT")
End Sub
Private Sub SwipeRight_Filter (E As Event)
Dim MouseEvent As JavaObject = E
Log("SWIPE_RIGHT")
End Sub