title: onPrepareOptionsMenu not getting called in Fragments
body: <pre><code>    @Override
      public void onCreateOptionsMenu(Menu menu,MenuInflater inflater){
          Log.d("Does", "get called");
          inflater.inflate(R.menu.menuItem, menu);
          super.onCreateOptionsMenu(menu,inflater);
      }
  
      @Override
      public void onPrepareOptionsMenu(Menu menu) {
          super.onPrepareOptionsMenu(menu);
          getActivity().invalidateOptionsMenu();
          MenuItem filter = menu.findItem(R.id.section);
  
          filter.setVisible(false);
  
      }
  </code></pre>
  
  <p>I am trying to load my menu in fragments and its getting loaed, but the <code>onPrepareOptionsMenu</code> is not getting called at all, where i need to hide some menu-items.</p>
  
  <p><strong>Update:</strong></p>
  
  <pre><code>    @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setHasOptionsMenu(true);
  }
  </code></pre>
  
  <p>I am calling <code>setHasOptionsMenu(true)</code> inside my <code>onCreate()</code> method.</p>