title: How to programmatically change button color - Android
body: <p>I have a button that I want to be round, so I made an xml file and set it as its background. The button is now round but I want to be able to change its color programmatically instead of hardcoding it into the xml file. How can I do this?</p>
  
  <p>Here is my xml file for round button.</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="oval"&gt;
             &lt;solid android:color="#ffcb05"/&gt;
        &lt;/shape&gt;
  </code></pre>