AnimationListener inside method
<p>I'm working on an older project, and now I'm stuck a little bit.</p>

<p>I have 9 buttons on one layout, and they all are connected to their methods who call their <code>Intents</code>.
Like this.. <code>button 1</code></p>

<pre><code>public void button1_click(View view){
    Intent intent = new Intent(getApplicationContext(), Btn1.class);
    startActivity(intent);
}
</code></pre>

<p>Now I after a couple of years, I want to implement an simple animation where the button will do something (whats the animation it's irrelevant).</p>

<p>Now in my Animation method - <code>startAnimation</code></p>

<pre><code>private void startAnimation(final View view){
       final Animation wigle = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoom_in);
       view.startAnimation(wigle);
       wigle.setAnimationListener(new AnimationListener() {

            @Override
            public void onAnimationStart(Animation animation) {
                // TODO Auto-generated method stub

            }

            @Override
            public void onAnimationRepeat(Animation animation) {
                // TODO Auto-generated method stub

            }

            @Override
            public void onAnimationEnd(Animation animation) {


            }
        });

}
</code></pre>

<p>I want to wait for the animation to finish and then to start my intent.</p>

<p>The <code>button 1</code> with this method looks like</p>

<pre><code>public void button1_click(View view){
    startAnimation(view);
    Intent intent = new Intent(getApplicationContext(), Btn1.class);
    startActivity(intent);
}
</code></pre>

<p>But my application starts the animation and then starts the <code>Intent</code>.
What should I implement to not to implement <code>setAnimationListener</code> to all buttons.</p>