Android Question [ B4XDrawer ] how do i remove the dark color when opening the side panel and how do i set the top?

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
Hello guys, I'm trying to remove the dark color that appears when opening the side menu

1600276647329.png

and I also want to define the top of it, below the panel I created ... is there any way to do this?

1600276695029.png 1600276756718.png

code :

B4X:
Sub Class_Globals
    Private Root As B4XView 'ignore
    Private xui As XUI 'ignore
    Private Drawer As B4XDrawer
    Private Hamburguer As ImageView
End Sub

'You can add more parameters here.
Public Sub Initialize As Object
    Return Me
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    'load the layout to Root
    Drawer.Initialize(Me, "Drawer", Root, 80%x)
    Drawer.CenterPanel.LoadLayout("Home")
    Drawer.LeftPanel.LoadLayout("menu_lateral")
    
    Drawer.LeftPanel.Height = Drawer.LeftPanel.Height - 56dip
    Drawer.LeftPanel.Top = 56dip ' dont works ...
    
End Sub

Sub Hamburguer_Click
    
    Log("clicou !")
    Drawer.LeftOpen = Not(Drawer.LeftOpen)
    
End Sub

Private Sub B4XPage_Resize (Width As Int, Height As Int)
    Drawer.Resize(Width, Height)
End Sub

Private Sub B4XPage_CloseRequest As ResumableSub
    #if B4A
    'home button
    If Main.ActionBarHomeClicked Then
        Drawer.LeftOpen = Not(Drawer.LeftOpen)
        Return False
    End If
    'back key
    If Drawer.LeftOpen Then
        Drawer.LeftOpen = False
        Return False
    End If
    #end if
    Return True
End Sub


'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.

have some way to do this ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Not sure why you will want to remove it. The user needs to see that the background is disabled.

You will need to modify the source code for this.

and I also want to define the top of it, below the panel I created ... is there any way to do this?
Best way to do it is by adding a panel below the custom title bar and initialize the drawer with this panel.
 
Upvote 0
Top