Android Question [SOLVED] Problem with b4x Drawer Menu

Schakalaka

Active Member
Licensed User
Longtime User
Hello. i post my full project.

it work with php and mysql.

i have add b4x drawer menu too.

When the app start it check if the user (by device ID,) exist on database. if not, it open the profile activity.
After save and create the user, i' d like go back to main activity, but here return the problem that the main activiti don 't load as well..

i'm using XAMPP as local server.
 

Attachments

  • Full project b4a.zip
    107.6 KB · Views: 187

iz0ndg

Active Member
Licensed User
Longtime User
Add to manifest :
B4X:
SetApplicationAttribute(android:usesCleartextTraffic, "true")

Comment line 366 :
B4X:
Drawer.CenterPanel.RemoveAllViews

Move "isUserExist" From Activity_Create to Activity_Resume

B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("main")
    Drawer.Initialize(Me, "Drawer", Activity, 300dip)
    Drawer.CenterPanel.Color = Colors.RGB(0,124,245)
    Drawer.LeftPanel.LoadLayout("LeftMenu")
    Drawer.CenterPanel.LoadLayout("main")
   

    If FirstTime Then
'        isUserExist
    End If
   
       

End Sub

B4X:
Sub Activity_Resume
    isUserExist
    LoadSlideMenu
    UpdateGUI
End Sub

In this way it seems to work, at least to me it goes on ...

That's All...
 
Upvote 0
Top