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
I face the same issue when I use state drawable in a Button but It does not change the background of the button. After searching for a long time, I found 2 solutions as below:
The first solution is change the application theme from MaterialComponents to AppCompat in values/themes.xml file. then state drawable will work well.
to