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
Dim button1 As Button
Dim label1 As Label
Dim panel1 As Panel
Dim count As Int
Dim bars3 As BitmapDrawable
Dim iv As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("test") ' loads button1, panel1 and label1
bars3.Initialize(LoadBitmap(File.DirAssets, "bars3.jpg"))
label1.Text = "Count = 0""
button1.Text = "Button"
iv.Initialize("settings") ' click event for image
iv.Background = bars3
' the buttons and panel have a corner radius of 7, so I kept the view that far away from the panel edges.
panel1.AddView(iv,7dip,7dip,panel1.Height*.8,panel1.Width*.8)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub button1_click
count = count + 1
label1.Text = "Count = " & count
End Sub
Sub settings_click
count = count + 1
label1.Text = "Count = " & count
End Sub