title: Animated Icon for ActionItem
body: <p>I have been searching everywhere for a proper solution to my problem and I can't seem to find one yet. I have an ActionBar (ActionBarSherlock) with a menu that is inflated from an XML file and that menu contains one item and that one item is shown as an ActionItem. </p>
  
  <p><strong>menu:</strong></p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;    
      &lt;item
          android:id="@+id/menu_refresh"       
          android:icon="@drawable/ic_menu_refresh"
          android:showAsAction="ifRoom"
          android:title="Refresh"/&gt;    
  &lt;/menu&gt;
  </code></pre>
  
  <p><strong>activity:</strong></p>
  
  <pre><code>[...]
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
      getSupportMenuInflater().inflate(R.menu.mymenu, menu);
      return true;
    }
  [...]
  </code></pre>
  
  <p>The ActionItem is displayed with an icon and no text however when a user clicks on the ActionItem, I want the icon to begin animating, more specifically, rotating in place. The icon in question is a refresh icon.</p>
  
  <p>I realize that ActionBar has support for using custom views (<a href="http://developer.android.com/guide/topics/ui/actionbar.html#ActionView">Adding an Action View</a>) however this custom view is expanded to cover the entire area of the ActionBar and actually blocks everything except the app icon, which in my case is not what I was looking for. </p>
  
  <p>So my next attempt was to try to use AnimationDrawable and define my animation frame-by-frame, set the drawable as the icon for the menu item, and then in <code>onOptionsItemSelected(MenuItem item)</code> get the icon and begin animating using <code>((AnimationDrawable)item.getIcon()).start()</code>. This however was unsuccessful. Does anyone know of any way to accomplish this effect?</p>