Hi,
I am trying to create a arc movement(means both RotateAnimation and
TranslateAnimation required) for a bitmap. I can do either rotate or
translate movement, but i cant integrate both.
the code which i am trying for this is,
private void createAnim(Canvas canvas) {
anim = new RotateAnimation(0, 180, canvas.getWidth() / 2, canvas
.getHeight() / 2);
anim2 = new TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF,
0.0f,
Animation.RELATIVE_TO_SELF, -1.0f,
Animation.RELATIVE_TO_SELF, 0.0f
);
anim.setRepeatMode(Animation.REVERSE);
anim.setRepeatCount(Animation.INFINITE);
anim.setDuration(2500);
anim.setInterpolator(new AccelerateDecelerateInterpolator());
startAnimation(anim);
// startAnimation(anim2);
}
Please guide me in this..
Thanks
Nithin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---