コード例 #1
0
  private void resetearMenu() {
    marcador = null;

    _menu.clear();
    MenuInflater inflater = getSupportMenuInflater();
    inflater.inflate(R.menu.menu_solo_info, _menu);
  }
コード例 #2
0
ファイル: RepositoryActivity.java プロジェクト: JoonyLi/gh4a
  @Override
  public boolean onPrepareOptionsMenu(Menu menu) {
    menu.clear();
    MenuInflater inflater = getSupportMenuInflater();
    inflater.inflate(R.menu.repo_menu, menu);

    if (Gh4Application.THEME != R.style.LightTheme) {
      menu.getItem(0).setIcon(R.drawable.navigation_refresh_dark);
    }

    MenuItem watchAction = menu.getItem(1);
    if (isAuthorized()) {
      if (!isFinishLoadingWatching) {
        watchAction.setActionView(R.layout.ab_loading);
        watchAction.expandActionView();
      } else {
        if (isWatching) {
          watchAction.setTitle(R.string.repo_unwatch_action);
        } else {
          watchAction.setTitle(R.string.repo_watch_action);
        }
      }
    } else {
      menu.removeItem(R.id.watch);
    }

    return super.onPrepareOptionsMenu(menu);
  }
コード例 #3
0
ファイル: Explore.java プロジェクト: puria/liquidroid
  /* (non-Javadoc)
   * @see android.app.Activity#onPrepareOptionsMenu(android.view.Menu)
   */
  @Override
  public boolean onPrepareOptionsMenu(Menu menu) {
    menu.clear();

    MenuInflater inflater = getSupportMenuInflater();
    inflater.inflate(R.menu.refresh, menu);
    return true;
  }
コード例 #4
0
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    menu.clear();
    inflater.inflate(R.menu.activity_main, menu);

    _menuReload = (MenuItem) menu.findItem(R.id.menu_reload);
    _menuReloading = (MenuItem) menu.findItem(R.id.menu_reloading);
  }
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    menu.clear();

    //        if(!getIntent().getBooleanExtra("showViewInWeb", false))
    if (viewUri != null && !viewUri.equals(""))
      inflater.inflate(R.menu.blackboard_dlable_item_menu, menu);
    // 	menu.removeItem(R.id.blackboard_d);

  }
コード例 #6
0
  @Override
  public boolean onPrepareOptionsMenu(Menu menu) {
    Log.w("ConversationListActivity", "onPrepareOptionsMenu...");
    MenuInflater inflater = this.getSupportMenuInflater();
    menu.clear();

    if (this.masterSecret == null) inflater.inflate(R.menu.text_secure_locked, menu);
    else inflater.inflate(R.menu.text_secure_normal, menu);

    super.onPrepareOptionsMenu(menu);
    return true;
  }
コード例 #7
0
 @Override
 public boolean onCreateOptionsMenu(Menu menu) {
   menu.clear();
   if (mShowQuitButton) {
     mMenuItemSettings =
         menu.add("设置")
             // .setIcon(R.drawable.logout_icon);
             .setIcon(R.drawable.settings);
     mMenuItemSettings.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
   }
   //        menu.add("设置").setIcon(R.drawable.setting_icon);
   return super.onCreateOptionsMenu(menu);
 }
  @Override
  public void onPrepareOptionsMenu(Menu menu) {
    menu.clear();
    getSherlockActivity().getSupportMenuInflater().inflate(R.menu.gripmenu, menu);
    SubMenu submenu = menu.getItem(0).getSubMenu();
    submenu.clear();

    if (category == null) {
      category =
          (getArguments() != null) ? getArguments().getString(SearchFragment.ARG_CATEGORY) : null;
    }

    if (getArguments() == null
        || !getArguments().containsKey(SearchFragment.ARG_LIST)
            && !getArguments().containsKey(SearchFragment.ARG_QUERY)) {
      submenu.add(Menu.CATEGORY_SYSTEM, R.id.submenu_search, Menu.NONE, R.string.search_txt);
    }

    submenu.add(Menu.CATEGORY_SYSTEM, R.id.map_view, Menu.NONE, R.string.map_view);

    if (category != null) {
      String addString =
          getString(
              R.string.add_poi_in_cat,
              getString(
                  CategoryHelper.getCategoryDescriptorByCategoryFiltered(
                          CategoryHelper.CATEGORY_TYPE_POIS, category)
                      .description));

      submenu.add(Menu.CATEGORY_SYSTEM, R.id.menu_item_addpoi, Menu.NONE, addString);
    }

    // NotificationsSherlockFragmentDT.onPrepareOptionsMenuNotifications(menu);

    super.onPrepareOptionsMenu(menu);
  }
コード例 #9
0
  @Override
  public boolean onPrepareOptionsMenu(Menu menu) {
    MenuInflater inflater = this.getSupportMenuInflater();
    menu.clear();

    boolean pushRegistered = TextSecurePreferences.isPushRegistered(this);

    if (isSingleConversation() && isEncryptedConversation) {
      inflater.inflate(R.menu.conversation_secure_identity, menu);
      inflater.inflate(
          R.menu.conversation_secure_sms, menu.findItem(R.id.menu_security).getSubMenu());
    } else if (isSingleConversation() && !pushRegistered) {
      inflater.inflate(R.menu.conversation_insecure, menu);
    }

    if (isSingleConversation()) {
      inflater.inflate(R.menu.conversation_callable, menu);
    } else if (isGroupConversation()) {
      inflater.inflate(R.menu.conversation_group_options, menu);

      if (!isPushGroupConversation()) {
        inflater.inflate(R.menu.conversation_mms_group_options, menu);
        if (distributionType == ThreadDatabase.DistributionTypes.BROADCAST) {
          menu.findItem(R.id.menu_distribution_broadcast).setChecked(true);
        } else {
          menu.findItem(R.id.menu_distribution_conversation).setChecked(true);
        }
      } else if (isActiveGroup()) {
        inflater.inflate(R.menu.conversation_push_group_options, menu);
      }
    }

    inflater.inflate(R.menu.conversation, menu);
    super.onPrepareOptionsMenu(menu);
    return true;
  }
コード例 #10
0
 private void bikinMenu(Menu menu) {
   menu.clear();
   getSupportMenuInflater().inflate(R.menu.activity_song_view, menu);
 }
コード例 #11
0
 private void bikinMenu(Menu menu) {
   menu.clear();
   getSupportMenuInflater().inflate(R.menu.activity_bookmark, menu);
 }
コード例 #12
0
 @Override
 public boolean onCreateOptionsMenu(Menu menu) {
   menu.clear();
   getSupportMenuInflater().inflate(R.menu.menu_main, menu);
   return true;
 }