2020-06-19 02:21 PM
I have multiple containers on the screen at any given time. Most of the time, these containers are on top of each other. Today I just noticed that touching on the top container, will sometimes click a button on the container below it. How can I stop this from happening?
2020-06-21 04:08 PM
How are these containers structured? If you have a background in each that has setTouchable(false); then nothing will fall through. As long as they're overlapping but the top container does not have anything on the entirity of its "canvas" to stop touches from falling through...
/Martin
2020-06-22 09:17 AM
I have a base class called settings menu. This class has a background, a header icon, and a back button and it also controls the menu popping in an out. All of my settings menus extend this base class, and add functionality necessary. The base classes background is a touchgfx::Box and is called mBackgroundBox, I call the function mBackgroundBox.setTouchable(false), yet the touches are still propagating through to the other settings menus behind it.
Any other thoughts?
Edit: Added clarifications
2020-07-22 11:24 AM
@Martin KJELDSEN This is still an issue. Do you have any other ideas?
2024-03-08 12:59 AM
I know its a old question, but i just stumbled across it, setTouchable needs to be true or else the touches "fall through".