I'm inflating a menu with menu items in Activity's toolbar and overwriting the options in fragment.But the new menu items are not showing up. 

**Activity**

```
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.encounter_tabacivity_menu, menu);
    return true;
}

```

**Fragment**

```
  @Override
public void onPrepareOptionsMenu(Menu menu) {
    super.onPrepareOptionsMenu(menu);
    menu.clear();    //remove all items
    getActivity().getMenuInflater().inflate(R.menu.encounter_frag_problemlist_menu, menu);
}

@Override
public void onResume() {
    super.onResume();
    getActivity().invalidateOptionsMenu();
}
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setHasOptionsMenu(true);
        view = inflater.inflate(R.layout.fragment_problem_list, container, false);
        init();
        return view;
    }

```