In my application I have 6 buttons. In onCreate(), I have a startAnimation() which will perform animation for the appearance of the buttons. After the call to this method I have setOnclickListener()s for each button.
My code in the onCreate() looks like this:
startAnimations();
b1.setOnClickListener(this);
b2.setOnClickListener(this);
b3.setOnClickListener(this);
b4.setOnClickListener(this);
b5.setOnClickListener(this);
b6.setOnClickListener(this);
The Problem is: when I tested my application and while the animation starts, I can click any button even if the button didn’t show yet. I mean, I can click in the button place and the action related to that button will start.
I want to force the buttons to NOT respond to the clicks until the whole animation is over.
Can I do that?
Why don’t you disable your buttons onCreate or by defaut and then when animations ends, enable it.
What do you think?