List of usage examples for android.view Menu clear
public void clear();
From source file:com.acrylicgoat.scrumnotes.DailyNotesActivity.java
@Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); getMenuInflater().inflate(R.menu.activity_dailynotes, menu); return true;// w w w . j av a2 s . com }
From source file:com.dwdesign.tweetings.fragment.BaseFiltersFragment.java
@Override public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { menu.clear(); inflater.inflate(R.menu.menu_filter, menu); super.onCreateOptionsMenu(menu, inflater); }
From source file:org.secuso.privacyfriendlynetmonitor.Activities.MainActivity.java
public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); if (RunStore.getServiceHandler().isServiceRunning(PassiveService.class)) { getMenuInflater().inflate(R.menu.toolbar_menu, menu); }//from ww w . j a v a 2 s . c o m return super.onPrepareOptionsMenu(menu); }
From source file:com.mifos.mifosxdroid.online.ClientChargeFragment.java
@Override public void onPrepareOptionsMenu(Menu menu) { menu.clear(); MenuItem menuItemAddNewDocument = menu.add(Menu.NONE, MENU_ITEM_ADD_NEW_CHARGES, Menu.NONE, getString(R.string.add_new)); menuItemAddNewDocument/*from w w w .ja va 2s . co m*/ .setIcon(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_action_content_new, null)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) menuItemAddNewDocument.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); super.onPrepareOptionsMenu(menu); }
From source file:eu.trentorise.smartcampus.trentinofamiglia.fragments.search.SearchFragment.java
@Override public void onPrepareOptionsMenu(Menu menu) { menu.clear(); getActivity().getMenuInflater().inflate(R.menu.gripmenu, menu); SubMenu submenu = menu.getItem(0).getSubMenu(); submenu.clear();/*from w w w . ja v a 2 s. c om*/ super.onPrepareOptionsMenu(menu); }
From source file:com.bobomee.android.recyclerviewhelperdemo.fragment.ItemSelectFragment.java
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { super.onCreateOptionsMenu(menu, inflater); menu.clear(); inflater.inflate(R.menu.add, menu);//from ww w . ja v a 2 s . co m }
From source file:com.example.amit.tellymoviebuzzz.ForecastFragment.java
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { menu.clear(); inflater.inflate(R.menu.forecastfragment, menu); super.onCreateOptionsMenu(menu, inflater); }
From source file:org.smssecure.smssecure.MediaOverviewActivity.java
@Override public boolean onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); menu.clear(); if (gridView.getAdapter() != null && gridView.getAdapter().getItemCount() > 0) { MenuInflater inflater = this.getMenuInflater(); inflater.inflate(R.menu.media_overview, menu); }/*from w w w . j a v a 2 s . c om*/ return true; }
From source file:com.mifos.mifosxdroid.online.LoanChargeFragment.java
@SuppressWarnings("deprecation") @Override/*ww w.j a v a 2s . co m*/ public void onPrepareOptionsMenu(Menu menu) { menu.clear(); MenuItem menuItemAddNewLoanCharge = menu.add(Menu.NONE, MENU_ITEM_ADD_NEW_LOAN_CHARGES, Menu.NONE, getString(R.string.add_new)); menuItemAddNewLoanCharge.setIcon(getResources().getDrawable(R.drawable.ic_action_content_new)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) menuItemAddNewLoanCharge.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); super.onPrepareOptionsMenu(menu); }
From source file:com.ben.gank.fragment.WebFragment.java
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { menu.clear(); inflater.inflate(R.menu.menu_web, menu); itemCollect = menu.findItem(R.id.action_collect); itemCollect.setEnabled(false);// ww w . ja v a 2 s . c o m getIsCollect(); super.onCreateOptionsMenu(menu, inflater); }