List of usage examples for android.view Menu removeItem
public void removeItem(int id);
From source file:com.techmighty.baseplayer.activities.BaseActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); if (!BasePlayerUtils.hasEffectsPanel(BaseActivity.this)) { menu.removeItem(R.id.action_equalizer); }/*from w w w. j a v a 2 s . com*/ ATE.applyMenu(this, getATEKey(), menu); return true; }
From source file:com.grokkingandroid.sampleapp.samples.data.contentprovider.lentitems.LentItemFormFragment.java
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.menu_detail_form_fragment, menu); if (mItemId == -1) { menu.removeItem(R.id.menu_delete); }//from w w w . ja va 2 s .c o m if (!getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA) || !Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { menu.removeItem(R.id.menu_photo); } }
From source file:com.pseudosudostudios.jdd.activities.WinActivity.java
@Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear();//from w ww.ja va 2 s . c o m getMenuInflater().inflate(R.menu.menu_win_activity, menu); if (!isSignedIn()) { menu.removeItem(R.id.action_achievements); menu.removeItem(R.id.action_leaderboards); } return true; }
From source file:com.bluros.music.activities.BaseActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); if (!MusicUtils.hasEffectsPanel(BaseActivity.this)) { menu.removeItem(R.id.action_equalizer); }/*from ww w .j a v a 2s . c o m*/ ATE.applyMenu(this, getATEKey(), menu); return true; }
From source file:com.andrada.sitracker.ui.fragment.AuthorsFragment.java
@Override public void onCreateOptionsMenu(@NotNull Menu menu, MenuInflater inflater) { if (mIsUpdating) { menu.removeItem(R.id.action_refresh); }/* ww w . j a v a 2 s . c o m*/ super.onCreateOptionsMenu(menu, inflater); }
From source file:jp.kyuuki.rensou.android.activity.BaseActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); // ??? ? ???/*from w w w. j av a 2 s .c o m*/ if (this instanceof RankingActivity) { menu.removeItem(R.id.action_ranking); } return true; }
From source file:com.ogunwale.android.app.yaps.ui.PhotosActivity.java
@Override public boolean onPrepareOptionsMenu(Menu menu) { if (mGettingRemoteData) menu.removeItem(R.id.menu_item_refresh); else if (menu.findItem(R.id.menu_item_refresh) == null) menu.add(R.id.menu_item_refresh); return super.onPrepareOptionsMenu(menu); }
From source file:com.stoyanr.feeder.activity.ViewItemActivity.java
@Override public boolean onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); getMenuInflater().inflate(R.menu.view_item_menu, menu); MenuUtils.setShowAsActionAll(menu);//ww w . ja v a2s. c o m if (newerItemId < 0) { menu.removeItem(R.id.newer_item); } if (olderItemId < 0) { menu.removeItem(R.id.older_item); } return true; }
From source file:com.gh4a.activities.IssueMilestoneEditActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { if (isInEditMode()) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.accept_delete, menu); menu.removeItem(R.id.accept); }/*from ww w.j ava 2 s .c o m*/ return super.onCreateOptionsMenu(menu); }
From source file:com.sutromedia.android.core.PhotoActivity.java
protected void onMenuCustomize(Menu menu) { super.onMenuCustomize(menu); menu.removeItem(R.menu.sort); }