blong Active Member Licensed User Longtime User Apr 8, 2011 #1 I have a program with a couple of different layout files and with buttons etc on each layout. The layouts occupy the entire screen size. When I start program I load layout "main" which has some imageviews on bottom which act as buttons. One of these imageviews loads another layout which obscures the "main" layout. The second layout has further imageviews on bottom of page. My problem is that when I tap hard (not sure why) on a part of the screen that obscure layout "main" imageviews then my TAP (click) is passed to layout main even though it is not visible as it is covered by a panel from 2nd layout. How can this happen ... I assumed that layouts were like Windows forms and events would remain on the top layout ??? Help please.:sign0085:
I have a program with a couple of different layout files and with buttons etc on each layout. The layouts occupy the entire screen size. When I start program I load layout "main" which has some imageviews on bottom which act as buttons. One of these imageviews loads another layout which obscures the "main" layout. The second layout has further imageviews on bottom of page. My problem is that when I tap hard (not sure why) on a part of the screen that obscure layout "main" imageviews then my TAP (click) is passed to layout main even though it is not visible as it is covered by a panel from 2nd layout. How can this happen ... I assumed that layouts were like Windows forms and events would remain on the top layout ??? Help please.:sign0085:
K kickaha Well-Known Member Licensed User Longtime User Apr 8, 2011 #2 Are you loading the layouts direct to the activity? ie Code: Copy Activity.LoadLayout("main") This can cause the issues you are having The correct way is to load each layout to a panel, and switch them with the Visible property. Klaus has an excellent tutorial here look at the TwoPanelLayouts example for what you need to do. Upvote 0
Are you loading the layouts direct to the activity? ie Code: Copy Activity.LoadLayout("main") This can cause the issues you are having The correct way is to load each layout to a panel, and switch them with the Visible property. Klaus has an excellent tutorial here look at the TwoPanelLayouts example for what you need to do.
Erel B4X founder Staff member Licensed User Longtime User Apr 11, 2011 #3 Unconsumed touch events are passed to the underlying views. You should add a sub for the panel touch event or click event and it will consume the event. The sub can be empty. Upvote 0
Unconsumed touch events are passed to the underlying views. You should add a sub for the panel touch event or click event and it will consume the event. The sub can be empty.