Android Question B4XDrawer - possibility to add top padding for user drawn title bars?

wimpie3

Well-Known Member
Licensed User
Longtime User
I seem to run into an issue with B4XDrawer while creating my own titlebar.

When B4XDrawer is used with a system drawn titlebar, the drawer opens UNDER the title bar. However, when there is no title bar, the drawer opens at location (0,0). Which is OVER the titlebar I have drawn myself using views.

Is there a way to add an option to give some extra padding at the top to bring the drawer a bit lower?
 

wimpie3

Well-Known Member
Licensed User
Longtime User
I really don't see how you I can get this behavior when
B4X:
#IncludeTitle: False
is activated...
In my case, the sliding menu overlaps my own title bar. Where can I find your example code?
 
Upvote 0

asales

Expert
Licensed User
Longtime User
If you use your own title bar, you need to get the B4XDrawer class and change this line (to subtract the height of the title bar):

Parent.AddView(mBasePanel, 0, 50dip, Parent.Width, Parent.Height - 50dip)
 
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
If you use your own title bar, you need to get the B4XDrawer class and change this line (to subtract the height of the title bar):

Parent.AddView(mBasePanel, 0, 50dip, Parent.Width, Parent.Height - 50dip)
Thanks I've found that solution as well but since it's a library that can be updates later on, I rather not change anything in the source code. But I guess there is no other way for the moment.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…