You will need to store the animation type in a global variable.
I recommend you to check the animation tutorial. It does run several animations in sequence.
Thanks Erel. I've played the animation tutorial quite a bit. But I have several animations going on at the same time, so I can't use a global variable. I'll have to use a Map for each view and store in it the type of the animation that the view is animating. This is not a biggie, I just thought I'd ask in case there was an easier way of handling it.
re: Animation Library in general
There seems to be a lot of limitations in the Animation library.
Example 1: Button2 a2.InitializeRotate("",0,180)
Why does it only pivot from the
top left corner of the view? I'd very much like to pivot from the
top right corner so the image can rotate clockwise (up and to the right). As it stands, I can only rotate an object counterclockwise up to the left or clockwise down and to the right (pivoting left top corner).
Example 2: Button 4 & 5. The InitializeScale scales to the top left corner. It would be more useful if it could scale according to an (x,y) parameter. Example: InitializeScaleXY(Event Name as String, FromX as Float, FromY as Float, ToX as Float, ToY as Float, PivotX as Int, PivotY as Int)
where PivotX and PivotY is the x,y location within the View. As it stands, we are limited to pivoting only at (0,0) or at (View.Width/2,View.Height/2).
Biggest animation problem. I don't see why B4A can't retain the last position of the view when the animation stops. I don't see the usefulness of repositioning the animated view back to its original starting position. Going back to the starting position isn't something that would happen very often, if at all, in a normal animation. Granted this can be overcome when using InitializeTranslate by keeping track of all of the delta's that has transpired during the animation and repositioning the view when all of the animation ends, but why create more work for the user? Why doesn't B4A do this automatically?
Same with Rotate, RotateCenter, and scaling animations. The user will have to duplicate the accumulated animations when the animation stops if he wants the view to be in the final animated position, otherwise the view snaps back to its original position. This is a lot more work for the user.
I feel there should be an animation.snapback=false property to prevent the view from snapping back to its original location. This would save the user a great deal of work. :sign0085:
TIA
Widget