title: Referencing a menu itemId in android studio
body: <p>I was wondering how i reference the menu Item i have created, in my switch?
  Thank you in advance.</p>
  
  <p>MY menu Item:</p>
  
  <pre><code>@Override
  public void onCreateContextMenu(ContextMenu menu, View v, 
  ContextMenu.ContextMenuInfo menuInfo) {
  
          menu.setHeaderTitle("Vælg en handling");
  
          //I just want one of the menu items under referenced.
          menu.add(0,0,0, "Slet denne regning");
          menu.add(0,1,0, "Omdøb denne regning");
  
      }
  </code></pre>
  
  <p>And my Switch Case:</p>
  
  <pre><code>@Override
  public boolean onContextItemSelected(MenuItem item) {
      adapter.getSelectedItem(item);
  
      switch (item.getItemId()){
          case //This is where i want one of my menu items referenced :
              finish();
      }
  
      return super.onContextItemSelected(item);
  }
  </code></pre>
  
  <p>It should also be noted that my switch is in my mainActivity, and my Menu item is   in another class(A Recycler adapter).</p>