Android Question SlideMenue B4XDrawer

Sinan Tuzcu

Active Member
Licensed User
Hi Erel,

how can I set the Elevation on 4dip?

B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Activity.LoadLayout("front_01")
    Drawer.Initialize(Me, "Drawer", Activity, 300dip)
    Drawer.CenterPanel.LoadLayout("front_01")
    ToolbarHelper.Initialize
    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
    ACToolBarLight1.InitMenuListener
    Drawer.LeftPanel.LoadLayout("Left")
    
    
    ListView1.AddSingleLine("Input/Output")
    ListView1.AddSingleLine("All ON/OFF")
    ListView1.AddSingleLine("Settings")
    ListView1.AddSingleLine("Disconnected")
    
    
    
        
    'chkTimeOut.Checked = Variablen.YM_TimeOutChecked
    Variablen.chkTimeOut_Checked = Variablen.YM_TimeOutChecked
End Sub
 

thetahsk

Active Member
Licensed User
Change your B4XDrawer.bas.

B4X:
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
 

Sinan Tuzcu

Active Member
Licensed User
The scrollview which containing the toggle buttons is loaded dynamically. Hince İ think that the elevation 0 will have.
 
Top