I am an experienced B4A user but am just starting with B4I. Pardon what I'm sure is a dumb question. I need to start another program, app, activity in B4I. In B4A I would simply use StartActivity(acitivityName). I've tried using the code below but I can't find any evidence that the program PersonalInfoIP ever runs but there is no error message. What am I doing wrong? I have tried several tests including putting the Page2 information in the Main program.
B4X:
'this is the main program. There is a button PersInfo in the layout Main2 and clicking it does start the sub PersInfo_click
Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Public PersInfo As Button
End Sub
Private Sub Application_Start (Nav As NavigationController)
'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
Page1.RootPanel.LoadLayout("Main2")
NavControl.ShowPage(Page1)
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
End Sub
Private Sub Application_Background
End Sub
Sub PersInfo_Click
PersInfo.Text = "Made it to sub" 'this works
PersonalInfoIP.Start()
End Sub
B4X:
'this is the second program PersonalInfoIP which never seems to run. The layout is never displayed
Sub [B]Process_Globals[/B]
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public Page2 As Page
Public TestButton As Button
End Sub
Sub [B]Start[/B]
Page2.initialize("Page2")
Page2.Title = "Personal Info"
Page2.RootPanel.Color = Colors.Black
Page2.RootPanel.LoadLayout("PersonalInfoTest")
End Sub
Sub [B]TestButton_click[/B]
TestButton.Text = "You made it"
return
End Sub