Android Question Drawerlayout support ?

Luk

Member
Licensed User
Hi,

I'm trying to migrate an Android studio based app (using drawerlayout) to A4B.
Is there a native solution to get this view and apply functions from it ?

e.g. drawerLayout.closeDrawer(Gravity.START);

If not, might we expect this view been added to a new version ?

Thanks.

Luk (Android newbie)
 

Luk

Member
Licensed User
I'm using the XmlLayoutBuilder to load the xml without problems.
This is the class I want to use :
http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html

Can I do something like this ?
B4X:
Dim drawerLayout As JavaObject
Dim x As XmlLayoutBuilder
'load the layout
x.LoadXmlLayout(Activity, "layout1")
drawerLayout.Initialize("android.support.v4.widget.DrawerLayout")
drawerLayout = x.GetView("myDrawer")
drawerLayout.RunMethod("CloseDrawer", "Gravity.START")
 
Top