title: Set theme for AppCompatButton programmatically
body: <p>I have a button that have two state and must have different background for each of them.</p>
  
  <p>For using advantage of android default implement of Button (for example ripple effect in +Lollipop) i didn't define custom background and using <code>colorButtonNormal</code> attribute as below :</p>
  
  <pre><code>&lt;style name="PrimaryButton.Success"&gt;
    &lt;item name="colorButtonNormal"&gt;@color/colorSuccess&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="PrimaryButton.Fail"&gt;
    &lt;item name="colorButtonNormal"&gt;@color/colorFail&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>I know how to set theme for my button when using XML(setting <code>app:theme</code> attribute of my <code>AppCompatButton</code>) but as i mention above,I need change it on run-time programmatically. how can i do it ?</p>