For more information:
My imageview go from left to right and I want to come back from right to left. However, it just go back to the original position instantly. On Sunday, 6 April 2014 22:28:19 UTC+8, Booker wrote: > > I have tried to load an animation xml to animate an ImageVIew. > > I set the animation to repeatMode RESERVE and set the repeat count to > INFINITIE. > > However, it just stops after the it completes. > > > My animation is below, I just want the view to go from left to right and > then come back to left repeatedly. > > > > <set xmlns:android="http://schemas.android.com/apk/res/android" >> android:repeatCount="infinite" android:repeatMode="reserve"> >> <translate >> android:fromXDelta="0%" >> android:toXDelta="110%" >> android:duration="10000"/> >> </set> > > > And below is my code > > //Animation variable >> ImageView animation_drawable_00, animation_drawable_01; >> Animation animation_set_00; >> private void init_animation() { >> animation_drawable_00 = (ImageView) >> findViewById(R.id.schedule_cloud_animation); >> animation_drawable_01 = (ImageView) >> findViewById(R.id.schedule_apple_animation); >> animation_set_00 = AnimationUtils.loadAnimation(this, >> R.anim.schedule_cloud_animation); >> animation_drawable_00.startAnimation(animation_set_00); >> } > > > > Please help. > -- 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 --- 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 android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.