Playground
Playground copied to clipboard
Swipe
In the Playground repository there is a Swipe demo that simulates image slides. I would like to assign an action when clicking on the image, but HitTest is disabled, I believe, to be able to scroll the images. Would there be any way I could get around this? Grateful
I've modified the demo to add what is known as an "interposer" class declaration for TImage
. This allows the images to have HitTest
set to True
so that they receive mouse events and can respond to clicks, however the mouse events are also "passed on" to the TSwipeView
, so that swiping still works.
very good
Playing with the demo. I noticed that if I click on the image and again a little and still keep it pressed, the image moves from one side to the other quickly, giving a bad effect. This didn't happen after the click update before.
Another detail, when I click on the Image it executes the "UpdateRightImage" event, so the app skips what would be the next image
OK.. I'll take a look this week
when I click on the Image it executes the "UpdateRightImage" event
I haven't been able to reproduce this issue on Android, iOS or Windows. Can you describe the steps?
I noticed that if I click on the image and again a little and still keep it pressed, the image moves from one side to the other quickly, giving a bad effect
I'm unable to reproduce this behaviour, either
I will forward the videos to you so you can have a better view.
https://github.com/DelphiWorlds/Playground/assets/8572209/c6e5e00c-3cfe-47b7-84ad-d67303b99501
1st video runs normally without a click (touch) on the slide
@
https://github.com/DelphiWorlds/Playground/assets/8572209/b9c8d33e-798c-4dd8-bc8b-414fba3e990a
2nd, after clicking on the banner, the ordering of the slides is lost and even duplicated
Can you provide a reproducible test case and attach it here?