I want to use a progress bar that ticks down from 100 by -1 a second. I have this code:
Globals:
Activity_Create:
Timer:
It is not working though? It is purely for visual purposes as the real count is kept by the countDown variable, but I still would like to use it.
Globals:
B4X:
Dim pbTimeLeft As ProgressBar
Activity_Create:
B4X:
pbTimeLeft.Initialize(pbTimeLeft)
pbTimeLeft.Progress = 100
Timer:
B4X:
Sub Timer1_Tick
countDown = countDown - 1
lblCountDown.Text = countDown
pbTimeLeft.Progress = pbTimeLeft.Progress - 1
If countDown=0 Then
Timer1.Enabled= False
End If
End Sub
It is not working though? It is purely for visual purposes as the real count is kept by the countDown variable, but I still would like to use it.