title: Change drawable start color and end color dynamically in android activity class
body: <p>Hi I am developing one android application in which I drawable resource to set backgroung for button. I want to change start and end color for that drawable programatically i.e. in activity class inside button click listener. My drawable looks like :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle"&gt;
    &lt;gradient android:startColor="#be584c" 
      android:endColor="#be584c"
      android:angle="270" /&gt;
    &lt;corners android:radius="2dp" /&gt;
    &lt;stroke android:width="1px"/&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>And I set it as background for button in xml file. <code>android:background="@drawable/download_button"</code></p>
  
  <p>and i want to change start color and end color of this drawable in activity class how to do this. Is there any way to f=do this. Need help. Thank you.</p>