I wanted to animate some views in my app so I went back and looked at Erel's animation tutorial which is pretty good
https://www.b4x.com/android/forum/threads/android-views-animation-tutorial.6967/#content
and I have a few questions.
Using a Map is overkill for simple animations and it would be nice if one or more of the Properties I suggested could be implemented or the existing properties be made public for the Animation class.
TIA
https://www.b4x.com/android/forum/threads/android-views-animation-tutorial.6967/#content
and I have a few questions.
- Why doesn't the Animation class have a View property (ReadOnly) that points to the view that is being animated? In the AnimationEnd method it would be nice if we could get the View that Sender is animating. In the demo's AnimationEnd event Erel compared Sender (animation) to 1 of 5 predefined global animation variables to determine the view that was being animated. But this won't work if the animation variables are created dynamically.
- Why doesn't the Animation class have an AnimationType property (ReadOnly) for the animation that is being performed? Namely Alpha, Rotate, RotateCenter, Scale, ScaleCenter, Translate. An Int would be fine for this property. We could then access this AnimationType property in the AnimationEnd event and know what to do next. Otherwise one has to create an AnimationEnd event for each type of animation.
- It would be nice if the Animation class had a Tag property so we could add some of this extraneous info to it.
Using a Map is overkill for simple animations and it would be nice if one or more of the Properties I suggested could be implemented or the existing properties be made public for the Animation class.
TIA