Android Question Drawerlayout support ?

Luk

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

DonManfred

Expert
Licensed User
Longtime User
B4A was made before Android Studio. Not sure but i think so...
AFAIK there is no import-functionality for "drawerlayout" (whatever this may be ;))
 
  • Like
Reactions: Luk
Upvote 0

Luk

Member
Licensed User
Longtime 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")
 
Upvote 0
Top