HI

I am trying to create the set of animation on the ImageView but the
problem is once I use set, it not doing continuously,

1) My XML file
<set xmlns:android="http://schemas.android.com/apk/res/android";
         android:shareInterpolator="true">

     <scale
          android:interpolator="@android:anim/
accelerate_decelerate_interpolator"
          android:fromXScale="1.0"
          android:toXScale="5.4"
          android:fromYScale="1.0"
          android:toYScale="9.6"
          android:pivotX="10%"
          android:pivotY="10%"
          android:fillAfter="false"
          android:duration="700" />
</set>

2) My Java Code
public class my2danimation extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        ImageView imageView = (ImageView) findViewById
(R.id.imageview);
        Animation my2dAnimation = AnimationUtils.loadAnimation(this,
R.anim.my2danimation);
        imageView.setImageResource(R.drawable.icon);
        //my2dAnimation.setRepeatCount(Animation.INFINITE);
        my2dAnimation.setRepeatMode(Animation.RESTART);
        imageView.startAnimation(my2dAnimation);
    }
}

If I remove <set> than it works but than I can't add more than one
animation.

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

Reply via email to