Android Button background color not changing

Please Use androidx.appcompat.widget.AppCompatButton insteas of Button.

  <androidx.appcompat.widget.AppCompatButton
        android:id="@+id/button_id_Login"
        android:layout_width="300dp"
        android:layout_height="wrap_content"
        android:layout_below="@id/textInnputLayout_editText_id_password"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="50dp"
        android:text="@string/Login_screen_button_text"
        android:background="@drawable/login_button_style"
        android:textAllCaps="false">
    </androidx.appcompat.widget.AppCompatButton>

Try use AppCompactButton instead of

<Button

use

<androidx.appcompat.widget.AppCompatButton

that will do the trick

Update: 01/06/2021

Found out that the above will not work on earlier Android versions. For materiel design Button use

app:backgroundTint="@color/green"

Tags:

Android