Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim htmlResults As WebView
Dim b1 As Button
Dim b2 As Button
Dim b3 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim ItemHeight As Int = 64dip
b1.Initialize("b1")
b2.Initialize("b2")
b3.Initialize("b3")
b1.Text = "1"
b2.Text = "2"
b3.Text = "3"
Dim W As Int = Activity.Width
Activity.AddView(b1, 0, 0, W/3, ItemHeight)
Activity.AddView(b2, W/3, 0, W/3, ItemHeight)
Activity.AddView(b3, W/3 * 2, 0, W/3, ItemHeight)
htmlResults.Initialize("htmlResults")
Activity.AddView(htmlResults, 0, ItemHeight, Activity.Width, Activity.Height - ItemHeight)
End Sub
Sub b1_Click
htmlResults.LoadUrl("https://www.google.com/")
htmlResults.ZoomEnabled = False
End Sub
Sub b2_Click
htmlResults.LoadUrl("https://www.google.com/")
htmlResults.ZoomEnabled = True
End Sub
Sub b3_Click
htmlResults.LoadUrl("https://www.google.com/")
htmlResults.ZoomEnabled = False
End Sub