Hi,

Use an AnimationSet :)

On Fri, Mar 13, 2009 at 12:33 AM, Nithin <nithin.war...@gmail.com> wrote:
>
> 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
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to