In the new AppCompat library, we can tint the button this way:
There are three options for it using setBackgroundTintList
int myColor = Color.BLACK;
button.setBackgroundTintList(new ColorStateList(EMPTY, new int[] { myColor }));button.setBackgroundTintList(ColorStateList.valueOf(myColor));button.setBackgroundTintList(contextInstance.getResources().getColorStateList(R.color.my_color));