title: Progress bar custom image rotate animation
body: <p>I am trying to use custom image as a progress bar and want to rotate it. I have tried to achieve by one of the answer here but getting error for <code>&lt;rotate/&gt;</code> element in the rotate_animation.xml. I understood that the <code>rotate</code> element should be in <code>anim</code> or <code>animation</code> folder but than not getting idea how I can use it in the <code>rotate_animation.xml</code> or anywhere so can rotate the progress bar image.</p>
  
  <h2>Error</h2>
  
  <blockquote>
    <p>Android resource linking failed
    ../app/src/main/res/drawable/rotate_animation.xml:8: error: resource
    drawable/load (aka com.example:drawable/load) not found. error: failed
    linking file resources.</p>
  </blockquote>
  
  <h3>Progress bar</h3>
  
  <pre><code>&lt;ProgressBar
      android:id="@+id/progress_bar"
      android:indeterminateDrawable="@drawable/progress_indeterminate"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintBottom_toBottomOf="parent"/&gt;
  </code></pre>
  
  <h1>Drawables</h1>
  
  <h2>rotate_animation.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;animation-list xmlns:android="http://schemas.android.com/apk/res/android"
      android:oneshot="false"&gt;
  
      &lt;item android:drawable="@drawable/ic_loader" android:duration="50" /&gt;
      &lt;item android:drawable="@drawable/ic_loader" android:duration="50" /&gt;
      &lt;item android:drawable="@drawable/ic_loader" android:duration="50" /&gt;
  
      &lt;!-- this one is giving error --&gt;
      &lt;rotate
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:drawable="@drawable/load"
          android:pivotX="50%"
          android:pivotY="50%"
          android:fromDegrees="330"
          android:toDegrees="360"
          android:repeatCount="1" /&gt;
  
  &lt;/animation-list&gt;
  </code></pre>
  
  <h2>progress_indeterminate.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
      android:drawable="@drawable/rotate_animation"
      android:pivotX="50%"
      android:pivotY="50%" /&gt;
  </code></pre>