I have an ImageView that I apply animation to when the app starts. After
the app has started, I apply another animation set to the same ImageView.
The problem I am having is the second animation is changing the location of
the ImageView. How do I apply the animation starting from the current
position of the ImageView?
Here is the start animation. It places the ImageView in the center of the
screen:
Animation pScale = new ScaleAnimation(.15f, .15f, .15f, .15f,Animation.
RELATIVE_TO_SELF,.5f,Animation.RELATIVE_TO_SELF,.5f);
animMoveCardsSet.addAnimation(pScale); animMoveCardsSet.setFillAfter(true);
ImageView.startAnimation(animMoveCardsSet);
Here is the listener animation:
Animation pScale = new ScaleAnimation(.25f, .25f, .25f, .25f);
Animation slideLeft = new TranslateAnimation(Animation.RELATIVE_TO_SELF,-500
,Animation.RELATIVE_TO_SELF, 0);
slideLeft.setDuration(1000L);
animMoveCardsSet.addAnimation(pScale);
animMoveCardsSet.addAnimation(slideLeft);
animMoveCardsSet.setFillAfter(true);
ImageView.startAnimation(animMoveCardsSet);
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/befeda26-230c-4cfd-8510-cc1a5f22383a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.