I created an app that supports both phone and tablet version so i use the android-support-v4.jar library.
My activity extends the ListFragment and I tried to override the onCreateOptionsMenu(Menu menu, MenuInflater inflater), as in the following link: http://developer.android.com/resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentMenuSupport.html
I previously called setHasOptionsMenu.
Unfortunately, it seems that I cannot override onCreateOptionsMenu().
This is the error message:
The method onCreateOptionsMenu(Menu menu, MenuInflater inflater) of type MyFragment must override or implements a supertype method.
And I did that with:
Public class MyFragment extends ListFragment
Make sure the imports are from the compatibility library and not from the SDK itself.