title: How to set circular progressbar inside button in android
body: <p>I want to make circular progress bar inside button. 
  but I don't want to use library like <code>dmytrodanylyk/circular-progress-button, etc..</code></p>
  
  <p>I think this solution is used <code>drawable</code>. </p>
  
  <p>so, i make <code>circular_progress.xml</code>,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;rotate xmlns:android="http://schemas.android.com/apk/res/android"
          android:fromDegrees="0"
          android:pivotX="50%"
          android:pivotY="50%"
          android:duration="1"
          android:toDegrees="360" &gt;
  
          &lt;shape
              android:innerRadiusRatio="3"
              android:shape="ring"
              android:thicknessRatio="8"
              android:useLevel="false" &gt;
              &lt;size
                  android:height="48dip"
                  android:width="48dip" /&gt;
  
              &lt;gradient
                  android:centerColor="#f0f0f0"
                  android:centerY="0.50"
                  android:endColor="#000000"
                  android:startColor="#ffffff"
                  android:type="sweep"
                  android:useLevel="false" /&gt;
          &lt;/shape&gt;
  
      &lt;/rotate&gt;
  </code></pre>
  
  <p>and, </p>
  
  <pre><code>&lt;Button
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:text="Log In"
                  android:layout_below="@+id/passwordWrapper"
                  android:layout_marginTop="5dp"
                  android:theme="@style/AppTheme.SignButton"
                  android:id="@+id/loginButton"
                  android:drawableRight="@drawable/circular_progress"
                  /&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5w6dLl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5w6dLl.png" alt="enter image description here"></a></p>
  
  <p>but, progress bar is stopped.</p>
  
  <p>second solution is to make custom button class having progressbar. </p>
  
  <p>but i don't know to make custom button class having progressbar.</p>