you could just create a Selector for your Button, so you can set it as its background but still have a click-effect whenever you click it.
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<gradient
android:startColor="insert color"
android:endColor="insert color"
/>
<stroke
android:width="3dp"
android:color="insert color" />
<corners
android:radius="3dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
<item android:state_pressed="false" >
<shape>
<gradient
android:endColor="insert color"
android:startColor="insert color"
/>
<stroke
android:width="3dp"
android:color="insert color" />
<corners
android:radius="3dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
</selector>
set this xml file as your background for your button:
mybtn.setbackground(R.drawable.thexmlfileabove);