title: Android Activity Slow transition
body: <p>I want to remove the old activity from stack after clicking on a button that triggers an intent to a new activity.
  The problem is: The transition is not smooth like a normal transition. For like a half second the screen is completely white.
  How to make this smooth?</p>
  
  <pre><code>button.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
  
           Intent intent = new Intent(MainActivity.this, HomeActivity.class);
           intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
           startActivity(intent);
      }
  });
  </code></pre>