rubensousa/RaiflatButton

Hi, How to change button background color with style.xml ?

Closed this issue · 3 comments

Hi, How to change button background color with style.xml ?

How to button background color ? Button animation disappears when I change it

Programmatically, right? You need to pass a ColorStateList using setSupportBackgroundTintList.

mNormalButton.setSupportBackgroundTintList(new ColorStateList(
                 new int[][]{new int[]{android.R.attr.state_enabled}},
                 new int[]{ContextCompat.getColor(this, R.color.colorPrimary)}));

thanks. 👍