Very good morning - I am using the DRAWER download example here
I don't need the cross-platform version this is the code it is using an activity not B4X Pages but hopefully you can point me into something that seems obvious that I am doing wrong
I am having an issue loading a layout it seems to bring it in as a full activity the layout("new-layout") is simply a panel with an image and a new xCLV .
CODE IN THE EXAMPLE BELOW LOADS LEFT AND CENTRE FINE
ISSUE HERE WHEN I TRY TO DO THIS
in the left menu I simply want to click on an item and change the centre area-
Appreciate I am using someone's time to answer this but any help I would be most grateful.
Regards
[B4X] B4XDrawer - sliding drawer
Edit: Cross platform example based on B4XPages https://www.b4x.com/android/forum/threads/b4x-b4xpages-b4xdrawer.120246/ A class that implements a sliding menu. Unlike the nice jfeinstein SlidingMenu library the drawer covers the activity instead of pushing it. It is similar to the various...
www.b4x.com
I don't need the cross-platform version this is the code it is using an activity not B4X Pages but hopefully you can point me into something that seems obvious that I am doing wrong
I am having an issue loading a layout it seems to bring it in as a full activity the layout("new-layout") is simply a panel with an image and a new xCLV .
CODE IN THE EXAMPLE BELOW LOADS LEFT AND CENTRE FINE
Code that sets up the left and centre layouts all works:
Sub Activity_Create(FirstTime As Boolean)
Drawer.Initialize(Me, "Drawer", Activity, 300dip)
Drawer.CenterPanel.LoadLayout("1")
For i = 1 To 30
ListView2.AddSingleLine("Item " & i)
Next
ToolbarHelper.Initialize
ToolbarHelper.ShowUpIndicator = True 'set to true to show the up arrow
Dim bd As BitmapDrawable
bd.Initialize(LoadBitmap(File.DirAssets, "hamburger.png"))
ToolbarHelper.UpIndicatorDrawable = bd
ACToolBarLight1.InitMenuListener
Drawer.LeftPanel.LoadLayout("Left")
Dim xui As XUI
ISSUE HERE WHEN I TRY TO DO THIS
in the left menu I simply want to click on an item and change the centre area-
I want to load in a new layout but it brings in the whole activity:
Drawer.CenterPanel.LoadLayout("new-layout")
Appreciate I am using someone's time to answer this but any help I would be most grateful.
Regards