예제 #1
0
 /** Creates the context menu that will be available for the items in the players list */
 @Override
 public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
   MenuInflater inflater = new MenuInflater(getActivity());
   inflater.inflate(R.menu.deelete_ctx_menu, menu);
   inflater.inflate(R.menu.edit_ctx_menu, menu);
   super.onCreateContextMenu(menu, v, menuInfo);
 }
예제 #2
0
 @Override
 public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
   super.onCreateContextMenu(menu, v, menuInfo);
   MenuInflater inflater = (MenuInflater) getActivity().getMenuInflater();
   inflater.inflate(R.menu.context_menu_list_item_places, menu);
   menu.setHeaderTitle(
       ((TextView) ((AdapterContextMenuInfo) menuInfo).targetView.findViewById(android.R.id.text1))
           .getText());
 }
  @Override
  public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    final SipProfile account = profileFromContextMenuInfo(menuInfo);
    if (account == null) {
      return;
    }
    WizardInfo wizardInfos = WizardUtils.getWizardClass(account.wizard);

    // Setup the menu header
    menu.setHeaderTitle(account.display_name);
    menu.setHeaderIcon(wizardInfos.icon);

    // Add a menu item to delete the note
    menu.add(
        0,
        MENU_ITEM_ACTIVATE,
        0,
        account.active ? R.string.deactivate_account : R.string.activate_account);
    menu.add(0, MENU_ITEM_MODIFY, 0, R.string.modify_account);
    menu.add(0, MENU_ITEM_DELETE, 0, R.string.delete_account);
    menu.add(0, MENU_ITEM_WIZARD, 0, R.string.choose_wizard);
  }
예제 #4
0
 @Override
 public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
   super.onCreateContextMenu(menu, v, menuInfo);
   MenuInflater inflater = getActivity().getMenuInflater();
   inflater.inflate(R.menu.edit_item_menu, menu);
 }
예제 #5
0
 @Override
 public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
   super.onCreateContextMenu(menu, v, menuInfo);
   getActivity().getMenuInflater().inflate(R.menu.menu_cell_context, menu);
 }