@Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
   // TODO Auto-generated method stub
   super.onCreateOptionsMenu(menu, inflater);
   menu.add("Menu 1a").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
   menu.add("Menu 1b").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
 }
Esempio n. 2
0
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
   // If the drawer is open, show the global app actions in the action bar. See also
   // showGlobalContextActionBar, which controls the top-left area of the action bar.
   inflater.inflate(R.menu.bulletins, menu);
   bottomMenu = menu;
   super.onCreateOptionsMenu(menu, inflater);
 }
Esempio n. 3
0
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
   super.onCreateOptionsMenu(menu, inflater);
   MainActivity mainActivity = (MainActivity) this.getActivity();
   ActionBar actionBar = (mainActivity).getSupportActionBar();
   CollapsingToolbarLayout toolbarLayout =
       (CollapsingToolbarLayout) mainActivity.findViewById(R.id.toolbar_layout);
   if (mainActivity.focusOnFragment) // focus is on Fragment
   {
     if (actionBar.getTitle() == null
         || !actionBar.getTitle().equals(this.getString(R.string.local_title)))
       toolbarLayout.setTitle(getString(R.string.local_title));
     inflater.inflate(R.menu.local, menu);
   } else menu.clear();
 }
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
   inflater.inflate(R.menu.options, menu);
   super.onCreateOptionsMenu(menu, inflater);
 }
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
   inflater.inflate(R.menu.patient_list_fragment, menu);
   super.onCreateOptionsMenu(menu, inflater);
 }
 /** Options menu initialization. OptionsMenu is used to add new city to list. */
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
   super.onCreateOptionsMenu(menu, inflater);
   inflater.inflate(R.menu.menu_options_list_fragment, menu);
   intitializeOptionsMenu(menu);
 }