Is this the correct way to animate the background color when the user clicks on a label?
I only ask because I had to put in the Sleep(200) otherwise the 2nd SetColorAnimated executes right away.
I could create a formal animation rtn to do it, but I wanted to keep it simple.
TIA
B4X:
Sub Label1_Click
If Sender Is Label Then
Private locLabel As Label=Sender
locLabel.SetColorAnimated(200, Colors.Transparent, Colors.Red)
Sleep(200)
locLabel.SetColorAnimated(200, Colors.Red, Colors.Transparent)
End If
End Sub
I only ask because I had to put in the Sleep(200) otherwise the 2nd SetColorAnimated executes right away.
I could create a formal animation rtn to do it, but I wanted to keep it simple.
TIA