title: Changing icon in Toolbar on click
body: <p>I have defined a Toolbar in my activity which inflates a menu that has one icon. I would like a way to change that icon; Such that when I click on it, it changes to another icon or color...Here's my toolbar code</p>
  
  <pre><code>final Toolbar bar = (Toolbar) findViewById(R.id.actionbar);
      bar.setTitle(Html.fromHtml("&lt;font color=#ffffff&gt;" + getString(R.string.print_s) + "&lt;/font&gt;"));
      bar.setNavigationIcon(getResources().getDrawable(R.drawable.back_btn));
      bar.setNavigationOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              DetailActivity.this.finish();
          }
      });
      bar.inflateMenu(R.menu.fav);
      bar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
          @Override
          public boolean onMenuItemClick(MenuItem item) {
              int id = item.getItemId();
              if (id == R.id.star) {
  
           //I want to change my toolbar icon here,once when its clicked...
  
                  myFavourites();
                  return true;
              }
              return false;
          }
      });
  </code></pre>
  
  <p>XML part(R.menu.fav)</p>
  
  <pre><code>  &lt;item
      android:id="@+id/star"
      android:icon="@mipmap/favorite_blue"
      app:showAsAction="ifRoom"
      android:title="@string/fav"/&gt;
  </code></pre>
  
  <p>I want to change the favorite_blue icon to something else when its clicked..</p>