Android Question Cannot load my own layout for Drawer.CentrePanel.LoadLayout using the AppCompat drawer example

llama

Member
Licensed User
Longtime User
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

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
 

DonManfred

Expert
Licensed User
Longtime User
 
Upvote 0

llama

Member
Licensed User
Longtime User
Thanks @DonManfred , this one I have seen before will have to reflow all my work into this, I have spent a few days laying out the interface on the other one I guess the one I downloaded is not loading layouts in the panel for a reason I just hope I was not using it in the wrong way as it seemed really neat to use., - Thank you for your time.
 
Upvote 0
Top