title: Different behavior of android.app.Fragment and android.support.v4.app.Fragment while using backstack
body: <p>I've created Activity and added a fragment to it using <code>FragmentManeger</code>. When i use <code>android.app.Fragment</code> and press the back button my application closes. When i use <code>android.support.v4.app.Fragment</code> and press the back button, the fragment is removed from the activity, but application is still working. I can't really understand why is that happening.</p>
  
  <p>Here is the code i used:</p>
  
  <p>Activity:</p>
  
  <pre><code>import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  
  public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          getFragmentManager().beginTransaction()
              .replace(R.id.content_fragment, new Fragment1())
              .addToBackStack("first")
              .commit();
      }
  }
  </code></pre>
  
  <p>Fragment:</p>
  
  <pre><code>import android.os.Bundle;
  import android.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  public class Fragment1 extends Fragment {
  
      public Fragment1() {
          // Required empty public constructor
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
           // Inflate the layout for this fragment
           return inflater.inflate(R.layout.fragment_fragment1, container, false);
      }
  }
  </code></pre>
  
  <p>When i simply replace import in <code>Activity</code> and <code>Fragment</code> to same classes, but in the support library, the result is different...</p>
  
  <p>EDIT:
  I also replaced <code>getFragemetManeger()</code> to <code>getSupportFragmentMeneger()</code> and it still works different</p>