title: Fragment's onOptionsItemSelected doesn't get called
body: <p>My fragment replaces the parent Activity options with a specific option item but when I click on the item, only activity's <code>onOptionItemSelected</code> gets called eventhough I've overridden the method inside Fragment. Am I missing something?</p>
  
  <p><strong>Fragment's methods:</strong></p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setHasOptionsMenu(true);
  }
  
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
  
      Log.d(TAG, "Fragment.onCreateOptionsMenu");
  
      if (mPasteMode) {
          menu.clear();
          inflater.inflate(R.menu.contexual_paste, menu);
          getActivity().getActionBar().setTitle("PasteMode");
      }
      super.onCreateOptionsMenu(menu, inflater);
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
  
      Log.d(TAG, "Fragment.onOptionsItemSelected");
  
      switch (item.getItemId()) {
          case R.id.context_action_paste:
              Toast.makeText(getActivity(),
                       "It worked ",
                      Toast.LENGTH_SHORT).show();
              return true;
          default:
              return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p><strong>Activity's methods:</strong></p>
  
  <pre><code>@Override
  public boolean onCreateOptionsMenu(Menu menu) {
  
      MenuInflater inflater = getMenuInflater();
      inflater.inflate(R.menu.main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
  
      Log.d(TAG, "MainActivitiy.onOptionsItemSelected");
      switch (item.getItemId()) {
          case R.id.action_refresh:
              Toast.makeText(this, "Action Refresh selected", Toast.LENGTH_SHORT).show();
              break;
          default:
              break;
      }
      return true;
  }
  </code></pre>
  
  <p><strong>Logcat output:</strong></p>
  
  <pre><code>MainActivity.onCreateOptionsMenu
  Fragment.onCreateOptionsMenu
  MainActivitiy.onOptionsItemSelected
  </code></pre>
  
  <p>So how can I have the <code>onOptionsItemSelected</code> of the fragment called?</p>