On touch apple "falls" (translates) down from a tree and should rotate around itself and translate.
Animation apple3_anim = AnimationUtils.loadAnimation(this,
R.anim.apple3_animation);
apple3.startAnimation(apple3_anim);
RotateAnimation r = new RotateAnimation(0.0f,
720.0f, Animation.RELATIVE_TO_SELF,
0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
r.setDuration(2000);
apple3.startAnimation(r);
the xml code for apple3_animation.xml file:
<?xml version="1.0" encoding="utf-8"?>
<translate
android:fromXDelta="0"
android:toXDelta="0"
android:fromYDelta="0"
android:toYDelta="450"
android:duration="1200"
>
</translate>
The issue is that the animations don't happen sequentially,only the last 'r' animation gets executed - the apple rotates around itself 720degrees. How do I make it go sequentially? even if i put all things in xml file, in the xml , only the last animation gets executed!