title: How to change style from code? Want to achieve skins
body: <p>How to change a style from code?</p>
  
  <p>I got a style used all across my app, for all buttons. If the user changes the skin of the app, the background of this style should change.</p>
  
  <pre><code>&lt;style name="ActionBtn"&gt;
      &lt;item name="android:layout_width"&gt;@dimen/action_btn_width&lt;/item&gt;
      &lt;item name="android:layout_height"&gt;@dimen/action_btn_height&lt;/item&gt;
      &lt;item name="android:background"&gt;@drawable/btn_frame_bgstate&lt;/item&gt;
      &lt;item name="android:padding"&gt;@dimen/action_btn_padding&lt;/item&gt;
      &lt;item name="android:layout_margin"&gt;@dimen/action_btn_margin&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>So far the only idea I got is to make a custom button that itself chooses its background on creation.</p>
  
  <p>I have not found any good, generic way for skinning android apps yet, but if I could change styles from code, that would do the trick.</p>
  
  <p>All suggestions welcome!</p>