title: Remove of switching activity animation on Android
body: <p>There are two activities.</p>
  
  <p>Activity A has a button that can switch to Activity B.</p>
  
  <p>Activity B also has a button that can switch to Activity A.</p>
  
  <p>here is my code,</p>
  
  <pre><code>@Override
  public void onTabSelected(Tab tab, FragmentTransaction ft) {
      Log.e("current", context.getClass().toString());
      Log.e("changeto", tab.getTag().toString());
      if(context.getClass()==tab.getTag())
          return;
  
      Intent intent = new Intent(new Intent(context,(Class&lt;?&gt;) tab.getTag()));
      intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
      intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
      context.startActivity(intent); 
  }
  </code></pre>
  
  <p>I want to remove the animation when i switch the activities, but it doesn't work.</p>
  
  <p>However if I remove</p>
  
  <pre><code>intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
  </code></pre>
  
  <p>it works perfectly. Why?</p>
  
  <p>Sorry for my bad English.</p>