title: Change PopupMenu items' title programmatically
body: <p>I have a PopupMenu with 4 options: add as friend, as neighbour, as workmate and as fan. What I want to do is if you click, lets say, on "Add as friend", then that option changes into "remove friend".</p>
  
  <p>Here's what I've tried so far:</p>
  
  <p>Activity:</p>
  
  <pre><code>private Menu menuOpts;
  
  public void showPopup(View v) {
      Context wrapper = new ContextThemeWrapper(this, R.style.PopupPerfilAjeno);
      PopupMenu popup = new PopupMenu(wrapper, v);
      popup.setOnMenuItemClickListener(this);
      popup.inflate(R.menu.menu);
      popup.show();
  
      menuOpts = popup.getMenu();
  }
  
  @Override
  public boolean onMenuItemClick(MenuItem item) {
      switch (item.getItemId()) {
          case R.id.add_friend:
              String add_as_friend = getString(R.string.add_as_friend );
  
              if (item.getTitle().toString().equals(add_as_friend )) {
                  addContact(1, item);
              }
              else {
                  removeContact(1, item);
              }
              return true;
          case R.id.add_workmate:
              //
              return true;
          case R.id.add_neighbour:
              //
              return true;
          case R.id.add_fan:
              //
              return true;
          default:
              return false;
      }
  }
  // circle: 1 = friend, 2 = workmate, 3 = neighbour, 4 = fan
  private void addContact(final int circle, final MenuItem item) {
  
      switch (circle) {
          case 1:
              menuOpts.findItem(R.id.add_friend).setTitle(R.string.remove_friend);
               // this won't work either:
               // item.setTitle(R.string.remove_friend);
               break;
          case 2:
              menuOpts.findItem(R.id.add_workmate).setTitle(R.string.remove_workmate);
               break;
          case 3:
              menuOpts.findItem(R.id.add_neighbour).setTitle(R.string.remove_neighbour);
               break;
          case 4:
              menuOpts.findItem(R.id.add_fan).setTitle(R.string.remove_fan);
               break;
       }
   }
  </code></pre>
  
  <p>menu.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item
          android:id="@+id/add_friend"
          android:orderInCategory="100"
          android:title="@string/add_as_friend"
          app:showAsAction="always" /&gt;
      &lt;item
          android:id="@+id/add_workmate"
          android:orderInCategory="100"
          android:title="@string/add_as_workmate"
          app:showAsAction="always" /&gt;
      &lt;item
          android:id="@+id/add_neighbour"
          android:orderInCategory="100"
          android:title="@string/add_as_neighbour"
          app:showAsAction="always" /&gt;
      &lt;item
          android:id="@+id/add_fan"
          android:orderInCategory="100"
          android:title="@string/add_as_fan"
          app:showAsAction="always" /&gt;
  &lt;/menu&gt;
  </code></pre>