Android Question B4XDrawer Error

leitor79

Active Member
Licensed User
Longtime User
Hi,

I'm trying to use the b4xDrawer, but I'm getting an error on initialization.


The line in question:
B4X:
Public Sub getCenterPanel As B4XView
    Return mCenterPanel <---- this one
End Sub

The initialization:

B4X:
Sub Activity_Create(FirstTime As Boolean)
       
    Drawer.Initialize(Me, "Drawer", Activity, 300dip)
    Drawer.CenterPanel.LoadLayout("layMain")
   
    ToolbarHelper.Initialize
    ToolbarHelper.ShowUpIndicator = True 'set to true to show the up arrow
    ToolbarHelper.UpIndicatorDrawable = BitmapToBitmapDrawable(LoadBitmap(File.DirAssets, "hamburger.png"))
    Toolbar.InitMenuListener
    Toolbar.Title = "Hello World"
   

    Drawer.LeftPanel.LoadLayout("layMenu")
   
End Sub

Also, I have added:

#Extends: android.support.v7.app.AppCompatActivity

And, my manifest file:



Regards,
 

leitor79

Active Member
Licensed User
Longtime User
Hi Erel, thank you for your answer.
I finally could solve this; It was due to a missing image file required by an imported layout file.

Thank you very much anyways.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…