The onCreateOptionsMenu() function of SherlockFragment is exactly like the Fragment one.
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.fragment_menu_xyz, menu);
}
Also you have to add the following to your onCreate()
function
setHasOptionsMenu(true);
The imports are:
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;