1 Drawable buttonDrawable = button.getBackground();
2 buttonDrawable = DrawableCompat.wrap(buttonDrawable);
3 //the color is a direct color int and not a color resource
4 DrawableCompat.setTint(buttonDrawable, Color.RED);
5 button.setBackground(buttonDrawable);
6