Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private AdView1 As AdView
Private Button1 As Button
Private TextField1 As TextField
Private TextView1 As TextView
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.RootPanel.LoadLayout("Prog2")
Page1.Title = "Factor Tree Creator - Free"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
TextView1.Height= Height - TextView1.top - 10dip
AdView1.Initialize("Ad", "ca-app-pub-6456812152893790/3462421222", Page1, AdView1.SIZE_BANNER)
Page1.RootPanel.AddView(AdView1, 0, 0, Page1.RootPanel.Width, 50)
AdView1.LoadAd
End Sub