Java Code Examples for android.view.MenuItem.setEnabled()

The following are Jave code examples for showing how to use setEnabled() of the android.view.MenuItem class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Quran   File: BookmarksFragment.java   View Source Code Vote up 6 votes
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
  super.onCreateOptionsMenu(menu, inflater);
  MenuItem sortItem = menu.findItem(R.id.sort);
  if (sortItem != null) {
    sortItem.setVisible(true);
    sortItem.setEnabled(true);

    if (BookmarksDBAdapter.SORT_DATE_ADDED == bookmarkPresenter.getSortOrder()) {
      MenuItem sortByDate = menu.findItem(R.id.sort_date);
      sortByDate.setChecked(true);
    } else {
      MenuItem sortByLocation = menu.findItem(R.id.sort_location);
      sortByLocation.setChecked(true);
    }

    MenuItem groupByTags = menu.findItem(R.id.group_by_tags);
    groupByTags.setChecked(bookmarkPresenter.isGroupedByTags());

    MenuItem showRecents = menu.findItem(R.id.show_recents);
    showRecents.setChecked(bookmarkPresenter.isShowingRecents());
  }
}
 
Example 2
Project: javaide   File: FileExplorerAction.java   View Source Code Vote up 6 votes
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    menu.add(0, R.id.select_all, 0, R.string.select_all).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
    menu.add(0, R.id.cut, 0, R.string.cut).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
    menu.add(0, R.id.copy, 0, R.string.copy).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);

    MenuItem pasteMenu = menu.add(0, R.id.paste, 0, R.string.paste);
    pasteMenu.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
    pasteMenu.setEnabled(fileClipboard.canPaste());

    renameMenu = menu.add(0, R.id.rename, 0, R.string.rename);
    renameMenu.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);

    shareMenu = menu.add(0, R.id.share, 0, R.string.share);
    shareMenu.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
    shareActionProvider = new ShareActionProvider(context);
    shareActionProvider.setOnShareTargetSelectedListener(this);
    MenuItemCompat.setActionProvider(shareMenu, shareActionProvider);

    menu.add(0, R.id.delete, 0, R.string.delete).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
    return true;
}
 
Example 3
Project: okwallet   File: SendCoinsFragment.java   View Source Code Vote up 6 votes
@Override
public void onPrepareOptionsMenu(final Menu menu) {
    final MenuItem scanAction = menu.findItem(R.id.send_coins_options_scan);
    final PackageManager pm = activity.getPackageManager();
    scanAction.setVisible(pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)
            || pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT));
    scanAction.setEnabled(state == State.INPUT);

    final MenuItem emptyAction = menu.findItem(R.id.send_coins_options_empty);
    emptyAction.setEnabled(state == State.INPUT && paymentIntent.mayEditAmount());

    final MenuItem feeCategoryAction = menu.findItem(R.id.send_coins_options_fee_category);
    feeCategoryAction.setEnabled(state == State.INPUT);
    if (feeCategory == FeeCategory.ECONOMIC)
        menu.findItem(R.id.send_coins_options_fee_category_economic).setChecked(true);
    else if (feeCategory == FeeCategory.NORMAL)
        menu.findItem(R.id.send_coins_options_fee_category_normal).setChecked(true);
    else if (feeCategory == FeeCategory.PRIORITY)
        menu.findItem(R.id.send_coins_options_fee_category_priority).setChecked(true);

    super.onPrepareOptionsMenu(menu);
}
 
Example 4
Project: boohee_v5.6   File: FoodDetailActivity.java   View Source Code Vote up 6 votes
private void addFavorite(String code, final MenuItem item) {
    showLoading();
    item.setEnabled(false);
    FoodApi.addFavorite(code, this.activity, new JsonCallback(this.activity) {
        public void ok(JSONObject object) {
            super.ok(object);
            item.setTitle(R.string.ia);
            item.setIcon(R.drawable.a3a);
            EventBus.getDefault().post(new FoodCollectEvent().setIsCollect(true));
        }

        public void onFinish() {
            super.onFinish();
            FoodDetailActivity.this.dismissLoading();
            if (item != null) {
                item.setEnabled(true);
            }
        }
    });
}
 
Example 5
Project: leoapp-sources   File: AuswahlActivity.java   View Source Code Vote up 5 votes
private void refresh() {
    adapter.refresh();
    int anzahl = adapter.gibAnzahlAusgewaehlte();
    if (anzahl > 0 && menu != null) {
        MenuItem item = menu.findItem(R.id.action_speichern);
        item.setVisible(true);
        item.setEnabled(true);
    }
    if (anzahl == 1)
        getSupportActionBar().setTitle("1 Kurs ausgewählt");
    else
        getSupportActionBar().setTitle(anzahl + " Kurse ausgewählt");
}
 
Example 6
Project: SimpleRssReader   File: MainActivity.java   View Source Code Vote up 5 votes
private void alterMenuItemAlpha(final MenuItem item, final boolean enable) {
    if (enable) {
        if (!item.isEnabled()) {
            item.setEnabled(true);
            item.getIcon().setAlpha(ICON_ALPHA_NORMAL);
        }
    } else if (item.isEnabled()) {
        item.setEnabled(false);
        item.getIcon().setAlpha(ICON_ALPHA_LOW);
    }
}
 
Example 7
Project: Android-Client   File: CreateFilterActivity2.java   View Source Code Vote up 5 votes
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.checkmark_menu, menu);

    //Set enabled state of done button if form is complete
    MenuItem menuItem = menu.findItem(R.id.action_done);
    if (menuItem != null) {
        boolean enabled = isFormComplete();

        menuItem.setEnabled(enabled);
        menuItem.getIcon().setAlpha(enabled ? 255 : 102);
    }

    return super.onCreateOptionsMenu(menu);
}
 
Example 8
Project: Canvas-Vision   File: PicDetail.java   View Source Code Vote up 5 votes
@Override
public void onReceive(Context context, Intent intent) {

    Toast toast = Toast.makeText(context,tags.get(0)+getResources().getString(R.string.down_complete), Toast.LENGTH_SHORT);
    toast.show();
    isDownloaded=true;
    MenuItem menuItem=menu.findItem( R.id.action_down);
    menuItem.setEnabled(true);
}
 
Example 9
Project: fitnotifications   File: AppChoicesActivity.java   View Source Code Vote up 5 votes
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.app_search, menu);

    MenuItem searchItem = menu.findItem(R.id.menu_app_search);
    MenuItem filterEnabledAppsItem = menu.findItem(R.id.menu_filter_enabled);

    SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
    searchView.setQueryHint(getString(R.string.search_query_hint));
    searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
        @Override
        public boolean onQueryTextSubmit(String query) {
            return recyclerViewShowSearchResult(query);
        }

        @Override
        public boolean onQueryTextChange(String newText) {
            return recyclerViewShowSearchResult(newText);
        }
    });

    searchItem.setEnabled(false);
    filterEnabledAppsItem.setEnabled(false);
    filterEnabledAppsItem.setChecked(mShowOnlyEnabledApps);

    return true;
}
 
Example 10
Project: fitnotifications   File: AppChoicesActivity.java   View Source Code Vote up 5 votes
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
    MenuItem searchItem = menu.findItem(R.id.menu_app_search);
    MenuItem filterEnabledItem = menu.findItem(R.id.menu_filter_enabled);

    if (mAdapter == null) { // cannot search yet
        searchItem.setEnabled(false);
        filterEnabledItem.setEnabled(false);
    } else {
        searchItem.setEnabled(true);
        filterEnabledItem.setEnabled(true);
    }

    return true;
}
 
Example 11
Project: firefox-tv   File: ManualAddSearchEngineSettingsFragment.java   View Source Code Vote up 5 votes
private void setUiIsValidatingAsync(final boolean isValidating, final MenuItem saveMenuItem) {
    final ManualAddSearchEnginePreference pref =
            (ManualAddSearchEnginePreference) findPreference(getString(R.string.pref_key_manual_add_search_engine));
    pref.setProgressViewShown(isValidating);

    saveMenuItem.setEnabled(!isValidating);
}
 
Example 12
Project: chromium-for-android-56-debug-video   File: AppMenuPropertiesDelegate.java   View Source Code Vote up 5 votes
/**
 * Updates the bookmark item's visibility.
 *
 * @param bookmarkMenuItem {@link MenuItem} for adding/editing the bookmark.
 * @param currentTab        Current tab being displayed.
 */
protected void updateBookmarkMenuItem(MenuItem bookmarkMenuItem, Tab currentTab) {
    bookmarkMenuItem.setEnabled(mBookmarkBridge.isEditBookmarksEnabled());
    if (currentTab.getBookmarkId() != Tab.INVALID_BOOKMARK_ID) {
        bookmarkMenuItem.setIcon(R.drawable.btn_star_filled);
        bookmarkMenuItem.setChecked(true);
        bookmarkMenuItem.setTitleCondensed(mActivity.getString(R.string.edit_bookmark));
    } else {
        bookmarkMenuItem.setIcon(R.drawable.btn_star);
        bookmarkMenuItem.setChecked(false);
        bookmarkMenuItem.setTitleCondensed(null);
    }
}
 
Example 13
Project: piast-trail   File: PlaceListFragment.java   View Source Code Vote up 5 votes
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    super.onCreateOptionsMenu(menu, inflater);
    inflater.inflate(R.menu.fragment_place_list, menu);
    
    MenuItem searchItem = menu.findItem(R.id.action_locate);
    searchItem.setEnabled(mClient.isConnected());
}
 
Example 14
Project: GitHub   File: MainActivity.java   View Source Code Vote up 4 votes
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
	Log.v(TAG, "onPrepareOptionsMenu called!");

	if (mSearchView != null) {
		//Has searchText?
		if (!mAdapter.hasSearchText()) {
			Log.d(TAG, "onPrepareOptionsMenu Clearing SearchView!");
			mSearchView.setIconified(true);// This also clears the text in SearchView widget
		} else {
			//Necessary after the restoreInstanceState
			menu.findItem(R.id.action_search).expandActionView();//must be called first
			//This restores the text, must be after the expandActionView()
			mSearchView.setQuery(mAdapter.getSearchText(), false);//submit = false!!!
			mSearchView.clearFocus();//Optionally the keyboard can be closed
			//mSearchView.setIconified(false);//This is not necessary
		}
	}
	// Fast Scroller
	MenuItem fastScrollerItem = menu.findItem(R.id.action_fast_scroller);
	if (fastScrollerItem != null) {
		fastScrollerItem.setChecked(mAdapter.isFastScrollerEnabled());
	}
	// Animate on update?
	MenuItem animateUpdateMenuItem = menu.findItem(R.id.action_animate_on_update);
	if (animateUpdateMenuItem != null) {
		animateUpdateMenuItem.setChecked(DatabaseConfiguration.animateOnUpdate);
	}
	// Headers are shown?
	MenuItem headersMenuItem = menu.findItem(R.id.action_show_hide_headers);
	if (headersMenuItem != null) {
		headersMenuItem.setTitle(mAdapter.areHeadersShown() ? R.string.hide_headers : R.string.show_headers);
	}
	// Sticky Header item?
	MenuItem stickyItem = menu.findItem(R.id.action_sticky_headers);
	if (stickyItem != null) {
		stickyItem.setEnabled(mAdapter.areHeadersShown());
		stickyItem.setChecked(mAdapter.areHeadersSticky());
	}
	// Scrolling Animations?
	MenuItem animationMenuItem = menu.findItem(R.id.action_animation);
	if (animationMenuItem != null) {
		animationMenuItem.setChecked(DatabaseConfiguration.animateOnScrolling);
	}
	// Reverse scrolling animation?
	MenuItem reverseMenuItem = menu.findItem(R.id.action_reverse);
	if (reverseMenuItem != null) {
		reverseMenuItem.setEnabled(mAdapter.isAnimationOnScrollingEnabled());
		reverseMenuItem.setChecked(mAdapter.isAnimationOnReverseScrollingEnabled());
	}
	// DiffUtil?
	MenuItem diffUtilItem = menu.findItem(R.id.action_diff_util);
	if (diffUtilItem != null) {
		diffUtilItem.setChecked(DatabaseConfiguration.animateWithDiffUtil);
	}
	return super.onPrepareOptionsMenu(menu);
}
 
Example 15
Project: scab   File: SettingsActivity.java   View Source Code Vote up 4 votes
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    UserController controller;
    switch (id) {
        case R.id.action_delete:
            controller = UserController.getInstance(this);
            controller.deleteCurrentProfile();

            if (controller.userCount() == 1) {
                item.setEnabled(false);
            }

            setResult(RESULT_OK);
            finish();
            return true;

        case R.id.action_add:
            // Sync any changed settings.
            controller = UserController.getInstance(this);
            controller.syncActiveProfile();
            // Add the new profile, changing the current profile.
            controller.addNewProfile();
            // Restart this activity, to force a re-load by all frames.
            startActivity(new Intent(SettingsActivity.this, SettingsActivity.class));
            // Close this instance of this activity.
            finish();
            return true;

        case R.id.action_switch:
            // Sync any changed settings.
            controller = UserController.getInstance(this);
            controller.syncActiveProfile();

            // Goto the switch activity
            startActivity(new Intent(SettingsActivity.this, SwitchProfileActivity.class));

            // Close this  activity.
            finish();
            return true;
    }

    return super.onOptionsItemSelected(item);
}
 
Example 16
Project: chromium-for-android-56-debug-video   File: CustomTabAppMenuPropertiesDelegate.java   View Source Code Vote up 4 votes
@Override
public void prepareMenu(Menu menu) {
    Tab currentTab = mActivity.getActivityTab();
    if (currentTab != null) {
        MenuItem forwardMenuItem = menu.findItem(R.id.forward_menu_id);
        forwardMenuItem.setEnabled(currentTab.canGoForward());

        mReloadMenuItem = menu.findItem(R.id.reload_menu_id);
        mReloadMenuItem.setIcon(R.drawable.btn_reload_stop);
        loadingStateChanged(currentTab.isLoading());

        MenuItem shareItem = menu.findItem(R.id.share_row_menu_id);
        shareItem.setVisible(mShowShare);
        shareItem.setEnabled(mShowShare);
        if (mShowShare) {
            ShareHelper.configureDirectShareMenuItem(
                    mActivity, menu.findItem(R.id.direct_share_menu_id));
        }

        MenuItem iconRow = menu.findItem(R.id.icon_row_menu_id);
        MenuItem openInChromeItem = menu.findItem(R.id.open_in_browser_id);
        if (mIsMediaViewer) {
            // Most of the menu items don't make sense when viewing media.
            iconRow.setVisible(false);
            openInChromeItem.setVisible(false);
        } else {
            try {
                openInChromeItem.setTitle(mDefaultBrowserFetcher.get());
            } catch (InterruptedException | ExecutionException e) {
                openInChromeItem.setTitle(
                        mActivity.getString(R.string.menu_open_in_product_default));
            }
        }

        // Add custom menu items. Make sure they are only added once.
        if (!mIsCustomEntryAdded) {
            mIsCustomEntryAdded = true;
            for (int i = 0; i < mMenuEntries.size(); i++) {
                MenuItem item = menu.add(0, 0, 1, mMenuEntries.get(i));
                mItemToIndexMap.put(item, i);
            }
        }
    }
}
 
Example 17
Project: tuxguitar   File: TGContextMenuBase.java   View Source Code Vote up 4 votes
public void initializeItem(ContextMenu menu, int id, TGActionProcessorListener actionProcessor, boolean enabled, boolean checked) {
	MenuItem menuItem = menu.findItem(id);
	menuItem.setOnMenuItemClickListener(actionProcessor);
	menuItem.setEnabled(enabled);
	menuItem.setChecked(checked);
}
 
Example 18
Project: SimpleRssReader   File: MainActivity.java   View Source Code Vote up 4 votes
@Override
public boolean onPrepareOptionsMenu(final Menu menu) {
    final MenuItem itemUpdate = menu.findItem(R.id.action_update);
    final MenuItem itemSortEntries = menu.findItem(R.id.action_sort_entries);
    final MenuItem itemExportAsOPML = menu.findItem(R.id.action_opml_export);
    final MenuItem itemFilter = menu.findItem(R.id.action_filter_by_categories);
    final MenuItem itemSearch = menu.findItem(R.id.action_search);
    final MenuItem itemSettings = menu.findItem(R.id.action_settings);
    final MenuItem itemFilterSubs = menu.findItem(R.id.action_filter_subscriptions_by_category);

    final boolean isSearchViewNotExpanded = !isSearchViewExpanded();

    if (isNotInInitialSetup()) {
        if (getLoadCurrentFeedFragment().isAdded()) {
            toggleMenuItemVisibility(itemSearch, false);
            toggleMenuItemVisibility(itemSortEntries, false);
            toggleMenuItemVisibility(itemFilterSubs, false);
            toggleMenuItemVisibility(itemExportAsOPML, false);
        } else if (getCurrentFeedFragment().isAdded()) {
            toggleMenuItemVisibility(itemSortEntries, false);
            toggleMenuItemVisibility(itemFilterSubs, false);
            toggleMenuItemVisibility(itemExportAsOPML, false);

            if (isSearchViewNotExpanded) {
                toggleMenuItemVisibility(itemUpdate, true);
                toggleMenuItemVisibility(itemSearch, true);
            }

            if (CurrentFeed.isRSSFeed() && CurrentFeed.isCategoriesAvailable() &&
                    isSearchViewNotExpanded) {
                toggleMenuItemVisibility(itemFilter, true);
            }
        } else if (getFeedSubscriptionsFragment().isAdded()) {
            toggleMenuItemVisibility(itemUpdate, false);
            toggleMenuItemVisibility(itemSortEntries, false);
            toggleMenuItemVisibility(itemFilter, false);

            if (isSearchViewNotExpanded) {
                toggleMenuItemVisibility(itemFilterSubs, true);
                toggleMenuItemVisibility(itemExportAsOPML, true);
                toggleMenuItemVisibility(itemSearch, true);
            }
        } else if (getSavedEntriesFragment().isAdded()) {
            toggleMenuItemVisibility(itemUpdate, false);
            toggleMenuItemVisibility(itemFilter, false);
            toggleMenuItemVisibility(itemFilterSubs, false);
            toggleMenuItemVisibility(itemExportAsOPML, false);

            if (isSearchViewNotExpanded) {
                toggleMenuItemVisibility(itemSortEntries, true);
                toggleMenuItemVisibility(itemSearch, true);
            }

            final MenuItem itemSortOrderAsc =
                    menu.findItem(R.id.action_sort_order_ascending);
            final MenuItem itemSortOrderDesc =
                    menu.findItem(R.id.action_sort_order_descending);

            if (getSavedEntriesFragment().getSortOrder() == SORT_ORDER_DESCENDING) {
                itemSortOrderDesc.setEnabled(false);

                if (!itemSortOrderAsc.isVisible()) {
                    itemSortOrderAsc.setVisible(true);
                }
            } else {
                itemSortOrderAsc.setEnabled(false);

                if (!itemSortOrderDesc.isVisible()) {
                    itemSortOrderDesc.setVisible(true);
                }
            }
        }

        if (isSearchViewNotExpanded) {
            toggleMenuItemVisibility(itemSettings, true);
        }
    }

    return true;
}
 
Example 19
Project: microMathematics   File: BaseFragment.java   View Source Code Vote up 4 votes
public void setInOperation(boolean inOperation, OnClickListener stopHandler)
{
    this.inOperation = inOperation;
    this.stopHandler = stopHandler;
    if (mainMenu == null)
    {
        return;
    }

    // update menu items
    for (int i = 0; i < mainMenu.size(); i++)
    {
        MenuItem m = mainMenu.getItem(i);

        if (m.getItemId() == R.id.action_exit)
        {
            continue;
        }

        m.setEnabled(!inOperation);

        // update undo button
        if (m.getItemId() == R.id.action_undo && !inOperation)
        {
            formulas.getUndoState().updateMenuItemState(m);
        }

        // update save button for work-sheet fragment
        if (fragmentNumber == WORKSHEET_FRAGMENT_ID && m.getItemId() == R.id.action_save)
        {
            final String str = preferences.getString(OPENED_URI, OPENED_FILE_EMPTY);
            final Uri uri = str.equals(OPENED_FILE_EMPTY) ? null : Uri.parse(str);
            m.setVisible(!FileUtils.isAssetUri(uri));
        }
        // update buttons background
        ViewUtils.updateMenuIconColor(activity, m);
    }

    // update floating buttons
    if (!inOperation)
    {
        primaryButtonsSet.activate(R.id.main_flb_action_play, this);
    }
    else if (inOperation)
    {
        if (stopHandler != null)
        {
            primaryButtonsSet.activate(R.id.main_flb_action_stop, stopHandler);
        }
        else
        {
            primaryButtonsSet.activate(-1, null);
        }
    }

    // update progress bar
    final ProgressBar progressBar = (ProgressBar) activity.findViewById(R.id.main_progress_bar);
    if (progressBar != null)
    {
        progressBar.setVisibility(inOperation ? View.VISIBLE : View.GONE);
    }
}
 
Example 20
Project: javaide   File: LogcatActivity.java   View Source Code Vote up 4 votes
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
    invalidateDarkOrLightMenuItems(this, menu);

    boolean showingMainLog = (mTask != null);

    MenuItem item = menu.findItem(R.id.menu_expand_all);
    if (mCollapsedMode) {
        item.setIcon(R.drawable.ic_expand_more_white_24dp);
        item.setTitle(R.string.expand_all);
    } else {
        item.setIcon(R.drawable.ic_expand_less_white_24dp);
        item.setTitle(R.string.collapse_all);
    }

    MenuItem clear = menu.findItem(R.id.menu_clear);
    MenuItem pause = menu.findItem(R.id.menu_play_pause);
    clear.setVisible(mCurrentlyOpenLog == null);
    pause.setVisible(mCurrentlyOpenLog == null);

    MenuItem saveLogMenuItem = menu.findItem(R.id.menu_save_log);
    MenuItem saveAsLogMenuItem = menu.findItem(R.id.menu_save_as_log);

    saveLogMenuItem.setEnabled(showingMainLog);
    saveLogMenuItem.setVisible(showingMainLog);

    saveAsLogMenuItem.setEnabled(!showingMainLog);
    saveAsLogMenuItem.setVisible(!showingMainLog);

    boolean recordingInProgress = ServiceHelper.checkIfServiceIsRunning(getApplicationContext(), LogcatRecordingService.class);

    MenuItem recordMenuItem = menu.findItem(R.id.menu_record_log);

    recordMenuItem.setEnabled(!recordingInProgress);
    recordMenuItem.setVisible(!recordingInProgress);

    MenuItem crazyLoggerMenuItem = menu.findItem(R.id.menu_crazy_logger_service);
    crazyLoggerMenuItem.setEnabled(UtilLogger.DEBUG_MODE);
    crazyLoggerMenuItem.setVisible(UtilLogger.DEBUG_MODE);

    MenuItem partialSelectMenuItem = menu.findItem(R.id.menu_partial_select);
    partialSelectMenuItem.setEnabled(!partialSelectMode);
    partialSelectMenuItem.setVisible(!partialSelectMode);

    return super.onPrepareOptionsMenu(menu);
}