Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private np1 As NumberProgressBar
Private np2 As NumberProgressBar
Private np3 As NumberProgressBar
Dim t1, t2, t3 As Timer
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")
np1.incrementProgressBy(0)
np1.ProgressTextColor = Colors.Blue
np1.ReachedBarColor = Colors.Yellow
np1.UnreachedBarColor = Colors.Red
np1.UnreachedBarHeight = 1dip
np1.ReachedBarHeight = 5dip
np1.Prefix = "%"
np1.Suffix = ""
t1.Initialize("t1",50)
t1.Enabled = True
np2.incrementProgressBy(0)
np2.ProgressTextColor = Colors.White
np2.ReachedBarColor = Colors.Green
np2.UnreachedBarColor = Colors.Red
np2.UnreachedBarHeight = 5dip
np2.ReachedBarHeight = 5dip
t2.Initialize("t2",60)
t2.Enabled = True
np3.incrementProgressBy(0)
np3.ProgressTextColor = Colors.Green
np3.ReachedBarColor = Colors.Magenta
np3.UnreachedBarColor = Colors.LightGray
np3.UnreachedBarHeight = 5dip
np3.ReachedBarHeight = 1dip
np3.Prefix = "Prefix"
np3.Suffix = "Suffix"
t3.Initialize("t3",100)
t3.Enabled = True
End Sub
Sub t1_tick
If np1.Progress <= 100 Then
np1.incrementProgressBy(1)
Else
t1.Enabled = False
End If
End Sub
Sub t2_tick
If np2.Progress <= 100 Then
np2.incrementProgressBy(1)
Else
t2.Enabled = False
End If
End Sub
Sub t3_tick
If np3.Progress <= 100 Then
np3.incrementProgressBy(1)
Else
t3.Enabled = False
End If
End Sub