mButton.setBackgroundTintList(getContext().getResources().getColorStateList(R.color.your_xml_name));
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:color="#000" />
</selector>