title: AppCompact v21 back navigation with fragment menu
body: <p>So.. I'm facing a problem that has been driving me crazy for the past hours.</p>
  
  <p>I have an App using the AppCompact v21 and toolbar. I also handle back navigation using:</p>
  
  <pre><code> getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true);
   getSupportActionBar().setDisplayHomeAsUpEnabled(true);
   getSupportActionBar().setHomeButtonEnabled(true);
  </code></pre>
  
  <p>In combination with the parent activity on the manifest. Which works perfect....</p>
  
  <p>My problem is:</p>
  
  <p>I have an activity with 3 tabs with a viewpager and I need one of the fragments to have it's own menu. </p>
  
  <p>I can inflate the menu just fine but once the menu is inflated the back arrow in that fragment don't work anymore. In the other 2 fragments of the view pager the back navigation through the toolbar still works. </p>
  
  <p>Inside my fragment:</p>
  
  <pre><code>// Inside onCreate...
  this.setHasOptionsMenu(true);
  
  // Later on somewhere else...
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
      super.onCreateOptionsMenu(menu, inflater);
      inflater.inflate(R.menu.menu_submit, menu);
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      super.onOptionsItemSelected(item);
      // my menu logic goes here.
      return true;
  }
  </code></pre>
  
  <p>Any suggestions? </p>