Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
tmr1second.Initialize("tmr1second", 1000)
'get starting point
CircularProgressBar1.Value=CalculateSecondsLeft
tmr1second.Enabled=True
End Sub
Private Sub tmr1second_Tick
'count down:
CircularProgressBar1.Value =CircularProgressBar1.Value-1 'Rnd(0, 101)
If CircularProgressBar1.Value=0 Then CircularProgressBar1.Value =100
End Sub
'old one'
Public Sub setValue(NewValue As Float)
AnimateValueTo(NewValue)
End Sub
'updated one'
Public Sub setValue(NewValue As Float)
If NewValue=0 Or NewValue=100 Then
'no animation
currentValue = NewValue
DrawValue(currentValue)
Else
AnimateValueTo(NewValue)
End If
End Sub