fsj Member Licensed User Longtime User Mar 9, 2016 #1 How can I detect, if the screen is touched anywhery, so I can brighten the screen there are many panels and buttons on the screen. should I set code in every panel/button or is there a simple way to do it?
How can I detect, if the screen is touched anywhery, so I can brighten the screen there are many panels and buttons on the screen. should I set code in every panel/button or is there a simple way to do it?
Erel B4X founder Staff member Licensed User Longtime User Mar 10, 2016 #2 You can add a transparent panel above all views and add a touch listener with Reflector.SetOnTouchListener: https://www.b4x.com/android/help/reflection.html#reflector_setontouchlistener Return False from the event sub and the event will pass through it. Upvote 0
You can add a transparent panel above all views and add a touch listener with Reflector.SetOnTouchListener: https://www.b4x.com/android/help/reflection.html#reflector_setontouchlistener Return False from the event sub and the event will pass through it.
klaus Expert Licensed User Longtime User Mar 10, 2016 #3 There must be an error somewhere else. Because the attached program works. Be aware that when you return False in Sub pnlAll_Touch only DOWN works the MOVE and UP actions don't work ! Attachments TestPanelTouchReflectior.zip 8 KB · Views: 255 Upvote 0
There must be an error somewhere else. Because the attached program works. Be aware that when you return False in Sub pnlAll_Touch only DOWN works the MOVE and UP actions don't work !