0

I have tried several options but none of them work and all the documentation I find is deprecated.

2 Answers2

1

Try with this: buttonName.setBackgroundTintList(AppCompatResources.getColorStateList(this, R.color.COLOR));

0

Hi Rodriguez Manuel Joaquin, i would suggest you try with the following line:buttonName.setBackgroundTintList(AppCompatResources.getColorStateList(this, R.color.COLOR));