I want a label to smoothly change from one color to another in a loop.
Right now I am using code like this:
But it seems like of clunky using a timer to determine when the animation finished.
Is there a better way?
Right now I am using code like this:
B4X:
Sub tmrRecord_Tick
tmrRecord.Enabled = False
If tmrRecord.Interval = 300 Then
tmrRecord.Interval = 400
lblRecording.SetTextColorAnimated(400,0xFFFF0000)
Else
tmrRecord.Interval = 300
lblRecording.SetTextColorAnimated(300, Colors.ARGB(80,180,180,180))
End If
tmrRecord.Enabled = True
End Sub
But it seems like of clunky using a timer to determine when the animation finished.
Is there a better way?