title: Passing multiple flags to an intent in android
body: <p>I have this activity that lists some information which I provide a refresh button for. The way I'm refreshing it (probably not the best way by any means) is just launching the activity all over again. To make the back stack work the way I need it to I need to pass in the <code>FLAG_ACTIVITY_CLEAR_TOP</code> flag to the intent and it works fine. But to give the illusion that the information is refreshing the information within the activity and not completely relaunching it, I also need to add the flag <code>FLAG_ACTIVITY_NO_ANIMATION</code>. So far, I haven't been able to get these two flags to work together. I've tried the following methods:</p>
  
  <pre><code>theIntent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION+Intent.FLAG_ACTIVITY_CLEAR_TOP);
  theIntent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION|Intent.FLAG_ACTIVITY_CLEAR_TOP);
  
  theIntent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
  theIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  </code></pre>
  
  <p>Clear top works correctly for all of them but the animation is still there. Any help would be greatly appreciated.</p>