title: Android Start activity without creating new instance
body: <p>Assume i have activity A that act as the root activity for my app . and form this activity i go to activity B.</p>
  
  <p>I want to be able to go back from B to A Without creating new instance of Activity A.</p>
  
  <p>this code is in Activity B </p>
  
  <pre><code>public void onBackPressed() {
          super.onBackPressed();
  //      Intent intent= new Intent(getBaseContext(), MainActivity.class);
  //      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
          Intent myIntent = new Intent(getBaseContext(), MainActivity.class);
          myIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
          startActivity(myIntent);
          Log.d("Back", "TEST");
      }
  </code></pre>
  
  <p>but it sill call the onCreate on activity A . What i want to do is have A in the background when activity b is started and whenever it is finished switch back to activity A</p>
  
  <p>this is the manifest</p>
  
  <pre><code>&lt;activity
              android:name=".MainActivity"
              android:label="@string/title_activity_main"
              android:screenOrientation="unspecified" 
              android:launchMode="singleTask"
              android:stateNotNeeded="false"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                   &lt;category android:name="android.intent.category.HOME"/&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;activity
              android:label="@string/app_name"
              android:name=".SubmenuActivty" &gt;
          &lt;/activity&gt;
  </code></pre>