title: Android activity restart
body: <p><br>
  I am having a confusion in restarting an activity.. I have two function that works well for the same task. Please guide me which is best and why?  </p>
  
  <pre><code>public void restart()   
      {  
          Intent intent = getIntent();  
          overridePendingTransition(0, 0);  
          intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);  
          finish();  
          overridePendingTransition(R.anim.fade,R.anim.fade);
          startActivity(intent);
  
      }
  </code></pre>
  
  <p><strong>or</strong></p>
  
  <pre><code>public void restart()   
      {         
          onCreate();  
      }  
  </code></pre>
  
  <p>Thanks In advance?</p>