iOS Question Get draggableview click event

andyr00d

Member
Licensed User
Longtime User
Hello, I'm trying to get the click event working for some child objects of the panel that was initialized with the draggableview class I added. It all works as I want it to, except now I cannot fire the click event on any of the child views (mostly imageviews + buttons)

B4X:
Dim dv As DraggableView
dv.Initialize(Page1.RootPanel, pnlMain)

pnlMain contains 5 imageviews and I want to be able to click them. I've tried using the 'Sender' function but no luck, and I am aware there is no reflection library within B4i... any ideas?

Thank you!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The problem is that DraggableView adds a transparent panel over the view and consumes the touch events. Maybe you can have two modes. In the first mode the views are draggable and in the second mode the views are locked and the user can click on them. Disable the transparent panel to make the actual views interactive.
 
Upvote 0

andyr00d

Member
Licensed User
Longtime User
Thanks for that - what I've done now is set dv.Panel1.UserInteractionEnabled = True from the start, and then within the DraggableView class I've set UserInteractionEnabled = False within the Panel1_Click Sub so it keeps turning it on & off.

This is working well, except now the only annoyance is that the user must click twice on an imageview for it to unlock and consume the click event (first click is to disable the user interaction). Is there now any way around this?

Thanks
 
Upvote 0

web-yacht

Member
Licensed User
Longtime User
Hi,
i'm looking some way to have a panel that can be moved by user with drag&drop
It it possible with DraggableView or with other class?
I cannot find this class, where i can find DraggableView class?

Thank you
 
Upvote 0
Top