onCreateOptionsMenu in fragment with menu id code example
Example: onCreateOptionsMenu for fragment
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.menu_sample, menu);
super.onCreateOptionsMenu(menu,inflater);
}