Instead of changing the background color of the buttons in the code, you can create a custom drawable and there define colors for various states (enabled, pressed, ...). To create a custom drawable, just create an XML file in /res/drawable folder, here is some sample content:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" >
<shape>
<!-- define style for disabled state here -->
</shape>
</item>
<item android:state_pressed="true" >
<shape>
<!-- define style for pressed state here -->
</shape>
</item>
<item>
<shape>
<!-- define style for normal state here -->
</shape>
</item>
</selector>
example content for the shape tag:
<solid
android:color="#ffffff"/>
<stroke
android:width="1dp"
android:color="#000000" />
<corners
android:radius="4dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
Now you can set this drawable as the button's background in the layout xml file. You then will only have to change the text color of the buttons.