Android Question B4XDrawer Panel allows click/touch to pass through

epiCode

Active Member
Licensed User
B4XDrawer panel allows all touch / click event to pass to elements below it unless it is on an element in the panel.

Although I avoid modification in a class directly, to avoid issues when upgrading, I tried capturing LeftPanel_Click and LeftPanel_touch sub in B4XDrawer but it does not fire.

Any help is appreciated.
 
Solution
Working Solution:

1. Added a panel (panelXX, which is added by loadlayout with all controls inside it instead of activity in visual designer)
2. Added following code in main module

B4X:
Private Sub panelXX_Touch (Action As Int, X As Float, Y As Float) As Boolean
    Return True
End Sub

LucaMs

Expert
Licensed User
Longtime User
B4XDrawer panel allows all touch / click event to pass to elements below it unless it is on an element in the panel.
It doesn't seem like that to me. I just tried the example of Erel with the 3 pages, I removed the single View of the drawer of the second page and I was not able to touch the btnDraw key.

Also because surely the left panel rests on another semi-transparent panel and this one is what prevents you from touching the underlying Views.
 

Attachments

  • ThreePages.zip
    196.7 KB · Views: 239
Upvote 0

epiCode

Active Member
Licensed User
It doesn't seem like that to me. I just tried the example of Erel with the 3 pages, I removed the single View of the drawer of the second page and I was not able to touch the btnDraw key.

Also because surely the left panel rests on another semi-transparent panel and this one is what prevents you from touching the underlying Views.
I will recheck if I am using a modified version.
 
Upvote 0

epiCode

Active Member
Licensed User
It doesn't seem like that to me. I just tried the example of Erel with the 3 pages, I removed the single View of the drawer of the second page and I was not able to touch the btnDraw key.

Also because surely the left panel rests on another semi-transparent panel and this one is what prevents you from touching the underlying Views.
Yes, It is modified version with support for right panel from here https://www.b4x.com/android/forum/threads/b4xdrawer-with-right-panel.102168/
 
Upvote 0

epiCode

Active Member
Licensed User
Working Solution:

1. Added a panel (panelXX, which is added by loadlayout with all controls inside it instead of activity in visual designer)
2. Added following code in main module

B4X:
Private Sub panelXX_Touch (Action As Int, X As Float, Y As Float) As Boolean
    Return True
End Sub
 
Upvote 0
Solution
Top