Well, that problem solved using oneshot property, by setting it to true.
(silly mistake)

Now I am suffering from the problem that I want to start the animation
again on click event like here, but it is playing only for the first click,
not after that.


  image=(ImageView)findViewById(R.id.img);
image.setImageResource(R.drawable.piggy_bank);
// xml animation file, in which the frames are given
image.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {
                // TODO Auto-generated method stub
                AnimationDrawable startAnimation = (AnimationDrawable)
image.getDrawable();
                   startAnimation.start();

            }
        });

Please help me sorting this.

-- 
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

Reply via email to