Android Question B4XDrawer Problem

Status
Not open for further replies.

okadakadasam

New Member
I used a SlideMenu class in my application ,how to implement the form call with B4XDrawer
i used this in slide menu

Sub SlideMenu_Click(Item As Object)
sm.Hide
Dim t As Int=Item
Select Case t
Case 1
StartActivity("neworder")
Case 2
StartActivity("market_offers")
End Select
End Sub

Thanks
 

kisoft

Well-Known Member
Licensed User
Longtime User
This is an old solution, use only this solution:
Write what you want to achieve and we will try to help.
 
Upvote 0

omarruben

Active Member
Licensed User
Longtime User
following many samples , I just want to confirm if I am doing the right thing to manage multiple SECTIONS of and app, pis this the right way? thank you:

setup the Drawer
B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Drawer.Initialize(Me, "Drawer", Activity, 300dip)
    Drawer.CenterPanel.LoadLayout("MainLayout")
    Drawer.LeftPanel.LoadLayout("LeftMenu")
    lsv_MenuListView.AddSingleLine("Home")
    lsv_MenuListView.AddSingleLine("Contact Us")
    lsv_MenuListView.AddSingleLine("Privacy Policy")   

End Sub

when the list is clicked , erase all views froma CenterPanel and load the new design
B4X:
Sub lsv_MenuListView_ItemClick(position As Int, value As Object)
 If position = 0 Then
        Drawer.CenterPanel.RemoveAllViews
        Drawer.CenterPanel.LoadLayout("MainLayout")
        Drawer.LeftOpen=False
    End If
    
    If position = 1 Then
        Drawer.CenterPanel.RemoveAllViews
        Drawer.CenterPanel.LoadLayout("contactus")
        Drawer.LeftOpen=False
    
    End If
End Sub
 
Upvote 0
Status
Not open for further replies.
Top