Android Question B4XDrawerAdvanced Width inconsistency?

John Naylor

Active Member
Licensed User
Longtime User
I've been having a go of the sample code for the excellent B4XDrawerAdvanced lib and suspect I have found a bug. (Only tested on B4A, Android 13)

@Alexander Stolte sorry to tag you but hey! ;-)

When I change the initialize line to

B4X:
Drawer.Initialize(Me, "Drawer", Root, 100%x)

the drawers work as expected and fill the entire screen.

If I then override with

B4X:
    Drawer.LeftPanel.LoadLayout("frm_Left")
    Drawer.RightPanel.LoadLayout("frm_Right")
    Drawer.RightPanelEnabled = True
 
    Drawer.SetSideWidth (300dip, True)            'Change to 300dip width

Only the right hand drawer has its width reduced.

Furthermore if I swap things round a little more and go with

B4X:
    Drawer.Initialize(Me, "Drawer", Root, 300dip)
    Drawer.CenterPanel.LoadLayout("frm_main")
 
    B4XPages.SetTitle(Me,"B4XDrawerAdvanced")
 
    Drawer.LeftPanel.LoadLayout("frm_Left")
    Drawer.RightPanel.LoadLayout("frm_Right")
    Drawer.RightPanelEnabled = True
 
     'Any value over 88% triggers the strange behavior
    Drawer.SetSideWidth (100%x, True)

I can open the left drawer once which opens to 300dip but then when I close it I cannot open it again. The right drawer continues to work and opens to 100%

I'll also be cheeky and add a wish here - to be able to set each drawer width independently would be an amazing addition.

[EDIT] Actually I can reopen the left drawer but it appears very difficult to do (I have to touch the screen in just the right place which is very hit and miss)
 
Last edited:
Solution
Update
  • 1.59
    • BugFixes
    • Add SetSideWidth - Sets the Width of both panels (Left and Right)
    • Add SetSideWidth_Left - Sets the Width of the Left Panel
    • Add SetSideWidth_Right - Sets the Width of the Right Panel
I have found a bug
Fixed in 1.59
to be able to set each drawer width independently would be an amazing addition.
Added in 1.59

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.59
    • BugFixes
    • Add SetSideWidth - Sets the Width of both panels (Left and Right)
    • Add SetSideWidth_Left - Sets the Width of the Left Panel
    • Add SetSideWidth_Right - Sets the Width of the Right Panel
I have found a bug
Fixed in 1.59
to be able to set each drawer width independently would be an amazing addition.
Added in 1.59
 
Upvote 1
Solution
Top