Android Question [Solved] B4XDrawer: What Type do I use to declare the B4XDrawer Drawer object?

Batman_

Member
Licensed User
Hi.

What type do I use to declare the Drawer object. The instructions say to initialize the drawer object but I think I have to declare it first and I do not know the Type to use.

Thanks in advance.
 

Batman_

Member
Licensed User
Hi.

I am trying to follow that and there is no Declaration statement in the Sub Globals in the so-called example. Is this not required as I get the error Undeclared variable 'variableName' is used before it was assigned any value?

Hence my question about Declaration and the Type to use as this isn't included in the example.
 

DonManfred

Expert
Licensed User
I am trying to follow that and there is no Declaration statement in the Sub Globals in the so-called example.
Sure it is!
From the Example:
B4X:
Sub Globals
    Private ACToolBarLight1 As ACToolBarLight
    Private ToolbarHelper As ACActionBar
    Private Drawer As B4XDrawer ' HERE. Note that the Type is the name of the Classfile. Here B4XDrawer
    Private ListView1 As ListView
End Sub
Hence my question about Declaration and the Type to use as this isn't included in the example.
Not true. There is a FULL Example provided for Android. It shows declaration, initialization and it has the Class included.
 

Attachments

Batman_

Member
Licensed User
Thanks for your help so far. I will get back to you and inform you how I go tomorrow.

I am offline until tomorrow (I am in Australia) so I am not ignoring any replies.

Regards.
 

Batman_

Member
Licensed User
AppCompat.JPG


Thanks Don.

Yes I had ViewsEx 1.30+ and XUI Library installed.

I didn't realise the example is in the AppCompat.b4a file. Maybe a more obvious file name may help new users?

What I didn't realise was I needed the AppCompatLib4 library also. This isn't super obvious.

Thanks for the assistance and if I have any new questions I'll start a new thread.

Please feel free to close this thread.

Regards.
 
Top