I\'m using the new material components com.google.android.material:material
with android x but I can\'t set a custom background to the button.
I know that I
In the Material Components Library, the MaterialButton
has a default style with insetBottom
and insetTop
with a value of 6dp
.
You can change it using:
If you want to change the background color you can use the app:backgroundTint
attribute or you can override some theme attributes from a default style then you can use new materialThemeOverlay
attribute.
In your case you can do something like:
Finally starting with the version 1.2.0-alpha06
you can use the android:background
attribute in the MaterialButton
.