title: Android Intent Clear Top not working
body: <p>I want to hit an intent to my HomeScreenActivity and clear all the activity that are alive in the Stack, below is the intent code:</p>
  
  <pre><code>Intent intent = new Intent(activity, HomeScreenActivity.class);
      if (Build.VERSION.SDK_INT &gt;= 11) {
          intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
      }
      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
      startActivity(intent);
      finish();
  </code></pre>
  
  <p>The stack is not getting cleared and when i press the back key, all the previous activity are shown, which is not the expected result.</p>
  
  <p>Please help!</p>
  
  <p>Thanks in advance.</p>