#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
'Activity module
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
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Label1 As Label
Dim Label2 As Label
' Dim Timer1 As Timer
Dim Button1 As Button
Dim Button2 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")
Activity.LoadLayout("dada")
'Timer1.Initialize("Timer1",1000)
'Timer1.Enabled = True
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button2_Click
Label1.Text = Label1.Text + 1
CheckScore
End Sub
Sub Button1_Click
Label1.Text = Label1.Text - 1
CheckScore
End Sub
Sub CheckScore
Log(Label1.Text)
If Label1.Text = "-4.0" Then
Label2.Text = "lost"
End If
End Sub