Android Question [B4X] B4XDrawer - sliding drawer - questions

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
1) I am trying to do what Peter Simpson showed in the original thread but I cant do it.
How do I make the LeftPanel not to overlap the Title? see image.

2) How to know what ListView line the user touched?
In the Main module you can see this code:

B4X:
Sub ACToolBarLight1_NavigationItemClick
    Drawer.LeftOpen = Not(Drawer.LeftOpen)
End Sub

Which I thought must hide the Left Panel when touched bit the panel is not hided.
And theres no reference to which line Ive touched.

Thanks
 

Attachments

  • 2018-12-31_1610.png
    2018-12-31_1610.png
    56.7 KB · Views: 575

Peter Simpson

Expert
Licensed User
Longtime User
Happy New year @Alberto Michelis.
If my memory serves me correcty, I get the height of the Toolbar (Title) so I started the Menu.Top of the menu using Toolbar.botton + 1.

Basically you just start the menu height at the height of the toolbar bottom + 1 Dip.

Sorry I can't give you the exact code as I'm currently having alcohol memory blockage issues lol, I'm currently out celebrating being alive to see yet another new year in (2019) and my development laptop is about 35 miles away at home, so no code to look at.

But I believe that's how I did it and it works with all devices.

I absolutely love Erels sliding drawer solution, it's great and way better than the solution that I was creating at the time of release for myself.

Edited:
By the way, after doing the above you must set the menu height as the main panel height - Toolbar.Height, that way the menu height does not go off the bottom of the screen.

I forgot to mention that previously.
 
Last edited:
Upvote 0

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Thanks Peter! and Happy new year!!!
I cant make it work.
Could you please post some code to do it?
and

2) How to know what ListView line the user touched?

Many Thanks
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Thanks Peter! and Happy new year!!!
I cant make it work.
Could you please post some code to do it?
and

2) How to know what ListView line the user touched?

Many Thanks


The menu basically works on a list, just add the list _ItemClick event. Actually you should look at Erels example, everything that you need is in there.
 
Last edited:
Upvote 0
Top