This thread continues the topic of the dark area to the right of the open drawer. That area is called scrim, in Googles specifications. Here is that topic:
[class] B4ADrawer - sliding drawer
https://www.b4x.com/android/forum/threads/class-b4adrawer-sliding-drawer.97828/
You're right. It did feel a bit off, so I played around with Gmail a bit more to figure out what the difference was. Turns out it was quite simple, I don't know why I missed it in the original thread.
I thought the rule was to close the drawer on TOUCH_ACTION_DOWN, but it's not. It's TOUCH_ACTION_UP. (Which also ignores all swipes on the scrim, which also is exactly what happens in Gmail.)
So all that needs to be changed is this
...to this...
[class] B4ADrawer - sliding drawer
https://www.b4x.com/android/forum/threads/class-b4adrawer-sliding-drawer.97828/
It will also make it more difficult to start the swipe gesture.
You're right. It did feel a bit off, so I played around with Gmail a bit more to figure out what the difference was. Turns out it was quite simple, I don't know why I missed it in the original thread.
I thought the rule was to close the drawer on TOUCH_ACTION_DOWN, but it's not. It's TOUCH_ACTION_UP. (Which also ignores all swipes on the scrim, which also is exactly what happens in Gmail.)
So all that needs to be changed is this
B4X:
If IsOpen And Action = mBasePanel.TOUCH_ACTION_DOWN Then
...to this...
B4X:
If IsOpen And Action = mBasePanel.TOUCH_ACTION_UP Then