title: How to prevent the activity from loading twice on pressing the button
body: <p>I am trying to prevent the activity from loading twice if I press the button twice instantly after the first click.</p>
  
  <p>I have an activity which loads on click of a button, say</p>
  
  <pre><code> myButton.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
         //Load another activity
      }
  });
  </code></pre>
  
  <p>Now because the activity to be loaded has network calls, it takes a little time to load (MVC). I do show a loading view for this but if I press the button twice before that, I can see the activity being loaded twice. </p>
  
  <p>Do any one know how to prevent this? </p>