title: RotateDrawable Programmatically in android
body: <p>How can i give <code>fromFegrees</code> , <code>toDegrees</code> and <code>android:color="#000000"</code> programmatically?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" &gt;
      &lt;item &gt;
  
  
          &lt;rotate 
              android:fromDegrees="45"
              android:toDegrees="45"
              android:pivotX="-40%"
              android:pivotY="87%" &gt;
  
              &lt;shape 
              android:shape="rectangle"  &gt;
              &lt;stroke android:color="@android:color/transparent" android:width="10dp"/&gt;
              &lt;solid  
                  android:color="#000000"  /&gt;
          &lt;/shape&gt;
  
          &lt;/rotate&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>i am using this xml in background of view.</p>
  
  <p>i have to create triangle programmatically. so need to create RotationDrawable programmatically.</p>