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 Main1 As Page
Private princi As Page
Private ImageView1 As ImageView
Dim MyButton As Button
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Main1.Initialize("Main1")
Main1.Title = "My App 1st page"
NavControl.NavigationBarVisible = False
MyButton .Initialize("MyButton ",MyButton .STYLE_SYSTEM)
SetMultiline(MyButton )
Main1.RootPanel.LoadLayout("splash")
NavControl.ShowPage(Main1)
End Sub
Sub ImageView1_Click
princi.Initialize("princi")
princi.Title = "My App 2nd page"
princi.RootPanel.LoadLayout("principal")
NavControl.ShowPage(princi)
End Sub
Public Sub SetMultiline(b As Button)
Dim no As NativeObject = b
no.GetField("titleLabel").SetField("numberOfLines", 0)
End Sub