B4XPage does not call the screen touch response routine:
B4X:
#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Public cvs As B4XCanvas
Public dg As Diagram
End Sub
Public Sub Initialize
dg.Initialize
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
'Root.LoadLayout("MainPage")
cvs.Initialize(Root)
' создать ноды для Фрейма № 1
dg.AddNode(1,"n1","Node-1","Base",300,200)
dg.AddNode(1,"n2","Node-2","Base",150,300)
dg.AddNode(1,"n3","Node-3","Base",400,350)
' соеденить ноды
dg.AddRelase("n1","n2","Base")
dg.AddRelase("n1","n3","Base")
' нарисовать фрейм
RddrawAll(1)
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
' перересовка всего кадра
Sub RddrawAll(frame As Int)
'Dim bc As BitmapCreator ', pnl As B4XView
'bc.Initialize(Root.Width / xui.Scale, Root.Height / xui.Scale)
For Each i As DiagramNode In dg.Nodes.Values
If i.Frame = frame Then
i.ReDraw(xui, Root,cvs)
End If
Next
'Root.SetBitmap(bc.Bitmap)
End Sub
Private Sub Root_Touch (Action As Int, X As Float, Y As Float)
Select Action
Case Root.TOUCH_ACTION_MOVE_NOTOUCH
Case Root.TOUCH_ACTION_DOWN
dg.TouchSelect(1,X,Y)
Case Root.TOUCH_ACTION_MOVE
If dg.MoveSelectedNode(X,Y) Then
RddrawAll(1 )
End If
Case Root.TOUCH_ACTION_Up
dg.SelectNode =Null
End Select
End Sub