title: How to apply button style on runtime in android kotlin
body: <p>How to apply runtime button style in android kotlin?</p>
  
  <p><strong>My Style (themes.xml):</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;style name="WhiteButtonLightTheme" parent="ThemeOverlay.AppCompat.Light"&gt;
          &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/colorWhite&lt;/item&gt;
          &lt;item name="colorButtonNormal"&gt;@color/colorWhite&lt;/item&gt;
          &lt;item name="colorControlHighlight"&gt;@color/colorGray&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="RedButtonLightTheme" parent="ThemeOverlay.AppCompat.Light"&gt;
          &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/colorRed&lt;/item&gt;
          &lt;item name="colorButtonNormal"&gt;@color/colorWhite&lt;/item&gt;
          &lt;item name="colorControlHighlight"&gt;@color/colorGray&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="GreenButtonLightTheme" parent="ThemeOverlay.AppCompat.Light"&gt;
          &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/colorGreen&lt;/item&gt;
          &lt;item name="colorButtonNormal"&gt;@color/colorWhite&lt;/item&gt;
          &lt;item name="colorControlHighlight"&gt;@color/colorGray&lt;/item&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>My Kotlin Code:</strong></p>
  
  <pre><code>var btnOpt4 = Button(con)
  btnOpt4 = rv.findViewById(R.id.btnOption4) as Button
  </code></pre>