title: FloatingActionButton rotation
body: <p>I have a FloatingActionButton that I want to make rotate while synchronizing data with an AsyncTask.</p>
  
  <p>But before using the AsyncTask, my problem is making the FAB rotate at all.</p>
  
  <p>Here are the involved parts of my code :</p>
  
  <pre><code>public void refreshAccountInfo(){
      /*Synchronization logic*/
      FloatingActionButton button = ButterKnife.findById(getActivity(), R.id.floating_action_button);
      Animation anim = AnimationUtils.loadAnimation(getActivity(), R.anim.clockwise);
      anim.setRepeatCount(Animation.INFINITE);
      button.startAnimation(anim);
  }
  </code></pre>
  
  <p><strong>clockwise.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;rotate xmlns:android="http://schemas.android.com/apk/res/android"
          android:startOffset="0"
          android:fromDegrees="360"
          android:toDegrees="0"
          android:pivotX="50%"
          android:pivotY="50%"
          android:duration="@android:integer/config_mediumAnimTime" &gt;
      &lt;/rotate&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>I have found <a href="https://stackoverflow.com/questions/29426138/rotating-floatingactionbutton">another thread</a> with the same issue but since the only answer isn't satisfying or understandable at all I make this thread of mine.</p>