Q:

Android XML - Apply and use different buttonStyles

At the moment, I feel a little bit stupid.
Here's my problem :
I actually want to apply different styles for some buttons, different from my default button's style.
My styles.xml :
    
    
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

    <style name="CustomTheme" parent="AppTheme">
        <item name="android:actionBarStyle">@style/CustomTheme.ActionBarStyle</item>
        <item name="cardViewStyle">@style/CustomTheme.CardViewStyle</item>
        <item name="buttonStyle">@style/CustomTheme.StandardButton</item>
    </style>

    <...>

    <style name="CustomTheme.StandardButton" parent="Base.Widget.AppCompat.Button.Colored">
        <item name="background">@drawable/ripple_button</item>
        <item name="android:tint">@color/white</item>
        <item name="android:elevation">8dp</item>
    </style>

    <style name="CustomTheme.ConfirmButton" parent="Base.Widget.AppCompat.Button.Colored">
        <item name="background">@drawable/ripple_button_confirm</item>
        <item name="android:tint">@color/white</item>
        <item name="android:elevation">8dp</item>
    </style>
    <style name="CustomTheme.CancelButton" parent="Base.Widget.AppCompat.Button.Colored">
        <item name="background">@drawable/ripple_button_cancel</item>
        <item name="android:tint">@color/white</item>
        <item name="android:elevation">8dp</item>
    </style>

</resources>

In fact, I tried a lot of things with inheritance of my CustomTheme.ConfirmButton and CustomTheme.CancelButton. 
What's changing from CustomTheme.StandardButton : the shape's color.
The ripple_button.xml is orange.
Then, I created two other ripple buttons, the first one is red (CancelButton), the second one is green (ConfirmButton).
By default, the <item name="buttonStyle">@style/CustomTheme.StandardButton</item> is applied.
But, in my activity, even when I declare a specific theme to my buttons, the default style is the only one applied. 
Note : the both buttons are always visible in these activity.
<android.support.constraint.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <Button
        android:id="@+id/btn_confirm_reset"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/lbl_confirm"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@id/btn_cancel_reset"
        android:layout_marginBottom="8dp"
        style="@style/CustomTheme.ConfirmButton"/>

    <Button
        android:id="@+id/btn_cancel_reset"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/lbl_cancel"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintLeft_toRightOf="@id/btn_confirm_reset"
        android:layout_marginBottom="8dp"
        style="@style/CustomTheme.CancelButton"/>
</android.support.constraint.ConstraintLayout>

I tried to apply the "default" StandardButton theme manually for each button (and then by removing the line <item name="buttonStyle">@style/CustomTheme.StandardButton</item> from my styles.xml but I still get the same behavior : all my buttons are always orange (and using StandardButton theme).
So I'm wondering where I fail / what I don't understand, or even if it's possible.
If a peaceful soul has an idea, some tips, I will be grateful (I can thank my hero with a french craft beer).
Have a great day, and thanks for reading.

A:

Update your Button Style as below:  
style.xml
<style name="CustomTheme.StandardButton" parent="Base.Widget.AppCompat.Button.Colored">
    <item name="android:backgroundTint">@color/orange</item>
    <item name="android:colorButtonNormal">@color/gray</item>
    <item name="android:colorControlHighlight">@color/blue</item>
    <item name="android:elevation">8dp</item>
</style>

<style name="CustomTheme.ConfirmButton" parent="Base.Widget.AppCompat.Button.Colored">
    <item name="android:backgroundTint">@color/orange</item>
    <item name="android:colorButtonNormal">@color/gray</item>
    <item name="android:colorControlHighlight">@color/blue</item>
    <item name="android:elevation">8dp</item>
</style>

<style name="CustomTheme.CancelButton" parent="Base.Widget.AppCompat.Button.Colored">
    <item name="android:backgroundTint">@color/orange</item>
    <item name="android:colorButtonNormal">@color/gray</item>
    <item name="android:colorControlHighlight">@color/blue</item>
    <item name="android:elevation">8dp</item>
</style>

You missed to append android: in item background.  
To set Ripple effect you have to use android:colorControlHighlight because android:backgroundTint will take only color as input and drawable will not work. Here android:colorButtonNormal will give no effect because we have set backgroundTint. If you will remove backgroundTint, it will take color from android:colorButtonNormal
You have to set the theme in Button instead of style. 
your_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <Button
        android:id="@+id/btn_confirm_reset"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/lbl_confirm"
        android:textColor="@color/white"
        android:theme="@style/CustomTheme.ConfirmButton"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@id/btn_cancel_reset"
        app:layout_constraintTop_toTopOf="parent" />

    <Button
        android:id="@+id/btn_cancel_reset"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/lbl_cancel"
        android:textColor="@color/white"
        android:theme="@style/CustomTheme.CancelButton"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toRightOf="@id/btn_confirm_reset"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>

Hope it will work!!

