title: How to switch from Fragment to Activity?
body: <p>Firstly I want to explain my problem,</p>
  
  <ol>
  <li>I have <code>Slide menu</code> in my app. I have used
  android.support.v4.app.Fragment for that</li>
  <li>I can move from fragment to activity easily.</li>
  <li>My problem is how to move from Fragment to activity.</li>
  </ol>
  
  <p>I tried the following code but no use.</p>
  
  <pre><code>FragmentManager fm = AddCaseFile.this.getSupportFragmentManager();
  FragmentTransaction ft = fm.beginTransaction();
  HospitalizationDetails fragment=new HospitalizationDetails();
  ft.replace(R.id.activity_main_content_fragment,fragment);
  ft.addToBackStack(null);
  ft.commit();
  </code></pre>
  
  <p>Where <code>AddCaseFile</code> is my current activity</p>
  
  <p><code>HospitalizationDetails</code> is fragment (which i have to go)</p>
  
  <p>Thanks in advance</p>