I have a problem that i have a TableLayout. Where i have about 30
animated ImageViews.
Each ImageView is clickable. Animations are oneShot.

public boolean onClick(View v) {
                v.setBackgroundResource(animations.get(v.getId()));
                AnimationDrawable animation = (AnimationDrawable)
v.getBackground();
                if(animation!=null){

                        animation.start();

                        return true;
                 }
                 return false;
}

Problem is i want to make all other ImageViews disabled, while one
clicked is being played.
For now if i click on all of them very fast they will all start
playing same time.

Is there any nice way to disabling all other ImageViews besides that i
can take all of Views and setEnabled(false) like this:

ImageView imgView1 = (ImageView)findViewById(R.id.animation_a);
imgView1.setEnabled(false);
ImageView imgView2 = (ImageView)findViewById(R.id.animation_b);
imgView2.setEnabled(false);
ImageView imgView3 = (ImageView)findViewById(R.id.animation_c);
imgView3.setEnabled(false);
ImageView imgView4 = (ImageView)findViewById(R.id.animation_d);
imgView4.setEnabled(false);
ImageView imgView5 = (ImageView)findViewById(R.id.animation_e);
imgView5.setEnabled(false);

Because after it is played i will have to enable them all back...

And other question, is there is no other nice way to get a callback
from AnimationDraw, when it is finished playing?? Cuz this is really
annoying.

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