I\'m currently using this code but the background is not changing.It is still showing accent-color as background.
Please read the documentation for Material button, from here
It says, "For filled buttons, your theme’s colorPrimary provides the default background color of the component, and the text color is colorOnPrimary. For unfilled buttons, your theme’s colorPrimaryprovides the default text color of the component, and the background color is transparent by default."
I think that's the reason you are seeing some other color(accent-color) also please check the attributes that set background colour.
Following attributes are mentioned :
app:backgroundTint
app:backgroundTintMode