I have created draggable view with the following code and works well but I can not handle any click/touch events, only the drag:
Main:
On the DraggableView I have:
The view drags ok but I need to be able to handle some click event on pabel1/p2.
Thanks
Main:
B4X:
Activity.LoadLayout("1")
Dim dv1 As DraggableView
dv1.Initialize(Activity,p2)
p2.SetBackgroundImage(LoadBitmap(File.DirAssets,"floorplan2.jpg"))
On the DraggableView I have:
B4X:
Sub Initialize(Activity As Activity, v As View)
innerView = v
panel1.Initialize("")
panel1.Color = Colors.Transparent
Activity.AddView(panel1, v.Left, v.Top, v.Width, v.Height)
ACTION_DOWN = Activity.ACTION_DOWN
ACTION_MOVE = Activity.ACTION_MOVE
ACTION_UP = Activity.ACTION_UP
Dim r As Reflector
r.Target = panel1
r.SetOnTouchListener("Panel1_Touch")
r.SetOnLongClickListener("Panel1_LongClick") <<<<< ' This event is not fired
End Sub
Sub Panel1_LongClick
End Sub
The view drags ok but I need to be able to handle some click event on pabel1/p2.
Thanks