Android Question SlideMenue B4XDrawer

Sinan Tuzcu

Well-Known Member
Licensed User
Hello all,

i use the slidemenue from this side:

it works also very well. But somthing is wrong. I am not able to put the MenueBar on the Top.
See picture:

How can I do it?

The Scrollview wich included Togglebuttons, will created by dynamic.

I need help.

thanks in advance

Sinan Tuzcu

Well-Known Member
Licensed User
Hi Erel,

how can I set the Elevation on 4dip?

Sub Activity_Create(FirstTime As Boolean)
    Drawer.Initialize(Me, "Drawer", Activity, 300dip)
    ToolbarHelper.ShowUpIndicator = True 'set to true to show the up arrow
    Dim bd As BitmapDrawable
    bd.Initialize(LoadBitmap(File.DirAssets, "striche.png"))
    ToolbarHelper.UpIndicatorDrawable =  bd
    ListView1.AddSingleLine("All ON/OFF")
    'chkTimeOut.Checked = Variablen.YM_TimeOutChecked
    Variablen.chkTimeOut_Checked = Variablen.YM_TimeOutChecked
End Sub
Upvote 0


Active Member
Licensed User

Change your B4XDrawer.bas.

Public Sub Initialize (Callback As Object, EventName As String, Parent As B4XView, SideWidth As Int)
    mEventName = EventName
    mCallBack = Callback
    mSideWidth = SideWidth
    #if B4A
    Dim creator As TouchPanelCreator
    mBasePanel = creator.CreateTouchPanel("base")
    #else if B4i
    mBasePanel = xui.CreatePanel("")
    Dim nme As NativeObject = Me
    Dim no As NativeObject = mBasePanel
    no.RunMethod("addGestureRecognizer:", Array(nme.RunMethod("CreateRecognizer", Null)))
    #End If
    Parent.AddView(mBasePanel, 0, 0, Parent.Width, Parent.Height)
    mCenterPanel = xui.CreatePanel("")
    mBasePanel.AddView(mCenterPanel, 0, 0, mBasePanel.Width, mBasePanel.Height)
    mDarkPanel = xui.CreatePanel("dark")
    mBasePanel.AddView(mDarkPanel, 0, 0, mBasePanel.Width, mBasePanel.Height)
    mLeftPanel = xui.CreatePanel("LeftPanel")
    mBasePanel.AddView(mLeftPanel, -SideWidth, 0, SideWidth, mBasePanel.Height)
    mLeftPanel.Color = xui.Color_Red
    #if B4A
    Dim p As Panel = mLeftPanel
    p.Elevation = 4dip        <-------------------------------------------------
    #Else If B4i
    Dim p As Panel = mDarkPanel
    p.UserInteractionEnabled = False
    p.SetBorder(0, 0, 0)
    p = mLeftPanel
    p = mCenterPanel
    p.SetBorder(0, 0, 0)
    p = mBasePanel
    p.SetBorder(0, 0, 0)
    #End If
End Sub
Upvote 0

Sinan Tuzcu

Well-Known Member
Licensed User
The scrollview which containing the toggle buttons is loaded dynamically. Hince İ think that the elevation 0 will have.
Upvote 0