title: I've to stop button animation after tap and navigates to another screen in android
body: <p>I've written the code for a button to animate it and navigate to the other screen. It is done successfully. But the navigation is done before completion of the animation of the button for that I need to stop or pause the animation for sometime and have to navigate to the other screen after the completion of animation.</p>
  
  <p>main.xml:</p>
  
  <pre><code>&lt;Button
      android:id="@+id/button1"     
  
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_above="@+id/button1"
      android:layout_centerHorizontal="true"
      android:background="@drawable/myborder"
      android:layout_marginTop="5dp"
     android:radius="12.0dip"
     android:height="30dp"        
      android:textColor="#009900"
      android:text="@string/mystring"
      android:topLeftRadius="12.0dip"
      android:topRightRadius="12.0dip"
      android:clickable="true"
      android:onClick="set1"
      android:visibility="visible"/&gt;
  </code></pre>
  
  <p>myborder.xml:</p>
  
  <pre><code>           &lt;?xml version="1.0" encoding="utf-8"?&gt;
            &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
             &lt;item&gt;
               &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" 
                  android:shape="rectangle"&gt; 
              &lt;solid android:color="#ffcccc"/&gt;
                 &lt;corners android:bottomLeftRadius="8dp"
                   android:bottomRightRadius="8dp"
              android:topLeftRadius="8dp"
             android:topRightRadius="8dp"/&gt;
            &lt;stroke
                android:color="@android:color/white"
               android:width="1dp" 
                   /&gt;
                 &lt;solid android:color="@android:color/transparent" /&gt;
              &lt;/shape&gt;
                &lt;/item&gt;
              &lt;/selector&gt;
  </code></pre>
  
  <p>activity.java:</p>
  
  <pre><code>        package com.example.button;
         import android.support.v7.app.ActionBarActivity;
          import android.content.Context;
         import android.content.Intent;
            import android.net.Uri;
          import android.os.Bundle;
           import android.view.Menu;
           import android.view.MenuItem;
          import android.view.View;
           import android.view.View.OnClickListener;
           import android.view.animation.Animation;
          import android.view.animation.AnimationUtils;
            import android.widget.Button;
          import android.widget.ImageButton;
          public class MainActivity extends ActionBarActivity {
          @Override
            protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
             final Animation myscale = AnimationUtils.loadAnimation(this, R.drawable.scale);
           Button b1 = (Button)findViewById(R.id.button1);
           b1.setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View v) {
           v.startAnimation(myscale);//animation starts  
         Intent browserIntent = new Intent(Intent.ACTION_VIEW,                                                  Uri.parse("http://www.oneness.com"));//navigating to the website 
                          startActivity(browserIntent);
                              }       });
  </code></pre>
  
  <p>BY this code my output is acting like this:
  if user tap on that button, it is navigating to the URL mentioned in the code. I am unable to see the animation clearly. I want to pause or stop animation for a while and then it automatically navigate to mentioned URL.</p>
  
  <p>Issue: User unable to see the animation as it is navigating to the mentioned link without showing any animation.</p>
  
  <p>Requirement: Need to show the complete animation to the user before navigating to another screen or to the link.</p>