title: Create complex drawable dynamically
body: <p>I want to create the following drawable dinamically to use it inside a Circle Progress bar:</p>
  
  <pre><code>&lt;rotate xmlns:android="http://schemas.android.com/apk/res/android"
  android:pivotX="50%"
  android:pivotY="50%"
  android:fromDegrees="0"
  android:toDegrees="720"&gt;
  
  &lt;shape
      android:shape="ring"
      android:innerRadiusRatio="3"
      android:thicknessRatio="8"
      android:useLevel="false"&gt;
  
      &lt;gradient
          android:type="linear"
          android:useLevel="false"
          android:startColor="@android:color/transparent"
          android:centerColor="@color/colorAccent"
          android:endColor="@android:color/black"
          android:angle="45" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p> </p>
  
  <p>I have to create it dynamically due is required to change the startColor/centerColor/endColor in execution time.</p>
  
  <p>Thanks in advance for your responses.</p>