2020-11-26 12:59 AM
I draw a container in a screen over all the other controls (such as buttons etc).
Background buttons continue to respond to click event as they were in foreground.
In my opinion this is not correct: they should be disabled by default.
I had to put: setTouchable(true) in the container to have a right behaviour.
Is this a BUG?
2020-12-10 09:06 AM
To prevent button touches beneath containers, you can add the ClickListener mixin to the container. You don't have to add any other code. This way the topmost container only will capture the click event, and will essentially discard it.
This is handy for preventing the user from touching elements beneath Modal windows, for instance. I also use it for preventing hardfaults when dragging the dynamic graph widget!
2020-12-11 12:03 AM
Mvill.17, that is not a bug. This is the intention. The first touchable widget will receive the click event.
Of course you could discuss if a Container should collect events as default. But atm. it inherits the behaviour from Drawable, that it is not touchable.