following many samples , I just want to confirm if I am doing the right thing to manage multiple SECTIONS of and app, is this the right way? thank you:
when a item on the list is clicked , erase all views from CenterPanel and load the new design?
thank you
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
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
when a item on the list is clicked , erase all views from CenterPanel and load the new design?
thank you