I have an Activity where, within that activity I have 2 menu buttons. Help and Over. When I click on one of them I start a new Activity
The activity Help has the following code:
And the Over activity has:
When I click on the main activity on the Help button I get the right Activity but when I klik on the back button, the whole program had closed.
Did someone know a solution ?
B4X:
Sub Help_Click
StartActivity("help")
End Sub
Sub Over_Click
StartActivity("over")
End Sub
The activity Help has the following code:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime1 As Boolean)
Activity.LoadLayout("help")
Activity.AddMenuItem("Help", "Help")
Activity.AddMenuItem("Over de app", "Over")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
'Activity.LoadLayout("Main")
End Sub
Sub Help_Click
StartActivity("help")
End Sub
Sub Over_Click
StartActivity("over")
End Sub
And the Over activity has:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Info As Label
End Sub
Sub Activity_Create(FirstTime2 As Boolean)
Activity.LoadLayout("over")
Info.Text="Over de app" & CRLF & CRLF & "Deze app is gemaakt door het Lorentz Casimir Lyceum." & CRLF & "Het is getest met de HTC Desire Z en op de AVD software van Google." & CRLF &CRLF & "Het Lorentz Casimir Lyceum is niet aansprakelijk voor schade die is of dreigt te worden toegebracht en voortvloeit uit of in enig opzicht verband houdt met het gebruik van deze app." & CRLF & "Ook kunnen wij de correcte werking niet garanderen." & CRLF & "De Lorentz Casimir app maakt gebruik van internet, houd er dus rekening mee dat dit, afhankelijk van je internet abonnement, geld kan kosten"
Activity.AddMenuItem("Help", "Help")
Activity.AddMenuItem("Over de app", "Over")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
'Activity.LoadLayout("Main")
End Sub
Sub Help_Click
StartActivity("help")
End Sub
Sub Over_Click
StartActivity("over")
End Sub
When I click on the main activity on the Help button I get the right Activity but when I klik on the back button, the whole program had closed.
Did someone know a solution ?