u should use the image view function as a button.
set two images, you can change the color of the button
use xml file for src of this image e.g.
<?xml version="1.0" encoding="UTF-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="false" android:drawable="@drawable/back_normal" /> <item android:state_pressed="true" android:drawable="@drawable/back_pressed" /> </selector>
for gredient style.
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:angle="90" android:startColor="#663300" android:centerColor="#330000" android:endColor="#330000"/> </shape>
thats it.
Praveen
source share