andyr00d Member Licensed User Longtime User Sep 4, 2016 #1 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) Code: Copy 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!
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) Code: Copy 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 Sep 4, 2016 #2 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
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.
andyr00d Member Licensed User Longtime User Sep 5, 2016 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Sep 5, 2016 #4 You might be able to implement a more sophisticated solution with this library: https://www.b4x.com/android/forum/t...zer-native-uigesturerecognizer.52836/#content Upvote 0
You might be able to implement a more sophisticated solution with this library: https://www.b4x.com/android/forum/t...zer-native-uigesturerecognizer.52836/#content
andyr00d Member Licensed User Longtime User Sep 6, 2016 #5 Awesome, got it working how I need it now... thanks @Erel Upvote 0
web-yacht Member Licensed User Longtime User Nov 11, 2016 #6 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
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
Erel B4X founder Staff member Licensed User Longtime User Nov 13, 2016 #7 Here: https://www.b4x.com/android/forum/threads/is-there-any-library-to-drag-views.50609/#post-330369 Upvote 0
Here: https://www.b4x.com/android/forum/threads/is-there-any-library-to-drag-views.50609/#post-330369