Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("layMain")
DateTime.TimeFormat = "mm:ss:SSS"
End Sub
Sub Activity_Resume
For i = 1 To 3
LogColor("I : " & i, Colors.Red)
Show
Next
End Sub
Sub Show
For j = 98 To 100
LogColor("J : " & j, Colors.Blue)
Label1.Text = j
Log(DateTime.Time(DateTime.Now))
Wait(1000) ' here I wish wait for one second, with GUI refresh
Next
End Sub
' ******************************************************
' *** These two routines should do what "I" need.
' *** Putting them in a simple library, you could have
' *** a Wait command which does what I mean.
' *** But the GUI will not be updated!
Public Sub Wait(Duration As Long)
WaitHelper(Duration)
Wait For WaitHelper_Completed
End Sub
Private Sub WaitHelper(Duration As Long)
Sleep(Duration)
CallSubDelayed(Me, "WaitHelper_Completed")
End Sub
' ******************************************************