I have a linear layout where I am programatically adding buttons. I want these buttons to have the default appearance and behaviour (floating, shadow etc) of a button except that I want to change the main color.

This is what I've tried 

```
val newContext = ContextThemeWrapper(baseContext, R.style.PrimaryColoredButton)
val button = Button(newContext)
button.text = "test"

```

my `styles.xml` contains the following code

```
<style name="PrimaryColoredButton" parent="Base.Widget.AppCompat.Button.Colored">
    <item name="colorButtonNormal">@color/colorAccent</item>
    <item name="colorControlHighlight">@color/colorPrimary</item>
</style>

```

However this doesn't change the color of my button but gives the default color.

[![enter image description here](https://i.stack.imgur.com/RE1lw.png)](https://i.stack.imgur.com/RE1lw.png)