I want to slide a panel to the left when a button is pressed. I created an AnimationPlus object:
and I have a AnimationEnd routine:
It works up until I do the BoatAnimation.Stop and the panel jumps back to where it started, even though I have BoatAnimation.PersistAfter = True
Can anyone see what I'm doing wrong?
B4X:
BoatAnimation.InitializeTranslate("AnimationLeft", 0dip, 0, -130dip, 0)
BoatAnimation.Duration = 700
BoatAnimation.RepeatCount = 0
BoatAnimation.RepeatMode=BoatAnimation.INTERPOLATOR_LINEAR
BoatAnimation.PersistAfter = True
BoatAnimation.Start(BoatPanel1)
and I have a AnimationEnd routine:
B4X:
Sub AnimationLeft_AnimationEnd
BoatAnimation.Stop(BoatPanel1)
End Sub
It works up until I do the BoatAnimation.Stop and the panel jumps back to where it started, even though I have BoatAnimation.PersistAfter = True
Can anyone see what I'm doing wrong?