title: Unable to override onCreateOptionsMenu in ListFragment
body: <p>I created an app that supports both phone and tablet version so i use the android-support-v4.jar library. </p>
  
  <p>My activity extends the ListFragment and I tried to override the onCreateOptionsMenu(Menu menu, MenuInflater inflater), as in the following link: <a href="http://developer.android.com/resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentMenuSupport.html" rel="nofollow noreferrer">http://developer.android.com/resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentMenuSupport.html</a></p>
  
  <p>I previously called setHasOptionsMenu.</p>
  
  <p>Unfortunately, it seems that I cannot override onCreateOptionsMenu().</p>
  
  <p>This is the error message:</p>
  
  <blockquote>
    <p>The method onCreateOptionsMenu(Menu menu, MenuInflater inflater) of
    type MyFragment must override or implements a supertype method.</p>
  </blockquote>
  
  <p>And I did that with:</p>
  
  <pre><code>Public class MyFragment extends ListFragment
  </code></pre>