List of usage examples for android.view Menu setGroupVisible
public void setGroupVisible(int group, boolean visible);
From source file:org.ubicompforall.cityexplorer.gui.ImportWebTab_oldWebView.java
@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); menu.setGroupVisible(R.id.planMenuGroupTrip, false); return false; }
From source file:org.intermine.app.activity.MainActivity.java
private void setMainMenuDisplayed(boolean displayed) { Menu menu = mNavigationView.getMenu(); menu.setGroupVisible(R.id.main, !displayed); menu.setGroupVisible(R.id.rest, !displayed); if (displayed) { menu.removeGroup(R.id.mines);// w w w . j a v a 2 s . c o m Set<String> mines = getStorage().getSelectedMineNames(); int counter = 0; for (String mine : mines) { menu.add(R.id.mines, counter, counter, mine); counter++; } } menu.setGroupVisible(R.id.mines, displayed); }
From source file:com.poloure.simplerss.FeedsActivity.java
@Override public boolean onPrepareOptionsMenu(Menu menu) { // If the navigation drawer is open, hide all menu items. menu.setGroupVisible(R.id.hide_while_navigation, m_showMenuItems); return super.onPrepareOptionsMenu(menu); }
From source file:net.wespot.pim.view.PimInquiriesFragment.java
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater(); menuInflater.inflate(R.menu.menu_inquiry, menu); menu.setGroupVisible(R.id.actions_general, true); menu.setGroupVisible(R.id.actions_wonder_moment, false); menu.setGroupVisible(R.id.actions_data_collection, false); menu.setGroupVisible(R.id.actions_friends, false); menu.setGroupVisible(R.id.actions_questions, false); menu.setGroupVisible(R.id.actions_usersite, false); return super.onCreateOptionsMenu(menu); }
From source file:org.videolan.vlc.gui.PlaylistActivity.java
protected void setContextMenuItems(Menu menu, int position) { menu.setGroupVisible(R.id.songs_view_only, true); menu.findItem(R.id.audio_list_browser_play_all).setVisible(false); menu.setGroupVisible(R.id.phone_only, AndroidDevices.isPhone()); //Hide delete if we cannot String location = ((MediaWrapper) mAdapter.getItem(position)).getLocation(); menu.findItem(R.id.audio_list_browser_delete).setVisible(FileUtils.canWrite(location)); }
From source file:com.janela.mobile.ui.user.HomeActivity.java
private void swapNavigationMenu() { Menu menu = navigationView.getMenu(); if (isUserNavVisible) { menu.setGroupVisible(R.id.user_select, false); menu.setGroupVisible(R.id.navigation_menu, true); menu.setGroupVisible(R.id.navigation_extra, true); navigationView.setItemIconTintList(navigationIconTint); } else {//from ww w . ja v a 2 s . co m menu.setGroupVisible(R.id.user_select, true); menu.setGroupVisible(R.id.navigation_menu, false); menu.setGroupVisible(R.id.navigation_extra, false); navigationView.setItemIconTintList(null); } isUserNavVisible = !isUserNavVisible; }
From source file:org.videolan.vlc.gui.audio.AudioAlbumsSongsFragment.java
private void setContextMenuItems(Menu menu, View v, int position) { if (mViewPager.getCurrentItem() != MODE_SONG) { menu.setGroupVisible(R.id.songs_view_only, false); menu.setGroupVisible(R.id.phone_only, false); }//from www. j av a2s. co m if (!AndroidDevices.isPhone()) menu.setGroupVisible(R.id.phone_only, false); menu.findItem(R.id.audio_list_browser_play).setVisible(true); }
From source file:uk.org.downiesoft.slideshow.SlidesFragment.java
/** * {@inheritDoc}//w w w .ja v a2 s . c o m */ @Override public void onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); menu.setGroupVisible(R.id.menu_group_start_slideshow, !mSlideshowRunning); menu.setGroupVisible(R.id.menu_group_stop_slideshow, mSlideshowRunning); }
From source file:org.videolan.vlc2.gui.audio.AudioAlbumsSongsFragment.java
private void setContextMenuItems(Menu menu, View v, int position) { if (mTabHost.getCurrentTabTag() != "songs" || mSongsAdapter.getItem(position).mIsSeparator) { menu.setGroupVisible(R.id.songs_view_only, false); menu.setGroupVisible(R.id.phone_only, false); }/*w w w. j a v a 2s. co m*/ if (!AndroidDevices.isPhone()) menu.setGroupVisible(R.id.phone_only, false); }
From source file:com.akop.bach.fragment.xboxlive.MessagesFragment.java
@Override public void onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); menu.setGroupVisible(R.id.menu_group_gold, mAccount.isGold()); }