07-20-2023, 02:06 PM
I try change color to MaterialButton with this code:
var materialButton = findViewByid(R.id....) as MaterialButton
materialButton.setBackgroundColor( ContextCompat.getColor(this@MyActivity, R.color.myCustomColor));
With a normal Button, it works.
Anyone have any ideas?
var materialButton = findViewByid(R.id....) as MaterialButton
materialButton.setBackgroundColor( ContextCompat.getColor(this@MyActivity, R.color.myCustomColor));
With a normal Button, it works.
Anyone have any ideas?