title: How to modify a button in tablelayout with a contextview in Android
body: <p>I was wondering how to change the label of a button once I performed a long click on it, in Android, using a contextmenu. </p>
  
  <p>I know how to generate a contextmenu with a long click, but I am not sure how to access the clicked button, view, in the onContextItemSelected(MenuItem item) method.  </p>
  
  <p>Also, the button that is clicked is in a tableLayout, so I am not sure if I can use an AdapterContextMenuInfo instance variable either to access the view.</p>
  
  <pre><code>@Override
  public boolean onContextItemSelected(MenuItem item){
      switch(item.getItemId()) {
      case R.id.menu_edit:
          //change button's text
          return true;
      case R.id.menu_delete:
          return true;
      case R.id.menu_cancel:
          return true;
      }
      return super.onContextItemSelected(item);
  }
  </code></pre>
  
  <p>Any insight into how to do this would be greatly appreciated.</p>
  
  <p>Many thanks in advanced.</p>