Creating a button style and adding a background

37 Views Asked by At

I want to create a style that changes the background of my button

I wrote this Style and it does what I want except it doesnt change the background of my button to the given drawable, it just stays this pale purple color. For context this is the drawable file

1

There are 1 best solutions below

0
kamyab On

Instead of choosing your background color in drawable

you can use android:backgroundTint="#YOURCOLOR" or add the color Programmatically as said in this Article