Hi all.
i m using this sub into a class module.
it is a simple animation to rotate the view, a imageview.
i call this sub on the click of imageview
now the question is, why this code works only the first time? on the first click?
i set it to rotate 360 right? later i set to 0 again to restart, thats correct?
how can i make to rotate when i click on the view? every time.
thx
i m using this sub into a class module.
B4X:
Sub Animacao_Rotacao (v As B4XView, duracao As Int, volta As Int)
If v.IsInitialized And v.Rotation <> 0 Then Return
If v.IsInitialized Then v.SetRotationAnimated(duracao, volta)
Sleep(duracao)
If v.IsInitialized Then v.Rotation = 0
Sleep(10)
End Sub
it is a simple animation to rotate the view, a imageview.
i call this sub on the click of imageview
B4X:
geral.Animacao_Rotacao(imgLogoMenu,500,360)
now the question is, why this code works only the first time? on the first click?
i set it to rotate 360 right? later i set to 0 again to restart, thats correct?
how can i make to rotate when i click on the view? every time.
thx