So I just went into attributes in android studio to change the color of the button, just like I would the name of the button and other attributes. But now the color seems not to be taking effect when I compile and run on my phone.
I can only see the color change when I change the theme view but, I can not see it when I compile and send to phone.
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:id="@+id/btn_answer2"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_weight="1"
android:background="#FA39D328"
android:backgroundTint="#E10A0A"
android:text="Button" />
2
Answers
Remove android:background="#FA39D328", use only android:backgroundTint="#E10A0A".
Use AppCompatButton