In my application I want to apply gradient to Button. I have written following code and the result is perfect.
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<padding
android:left="1dp"
android:top="1dp"
android:right="1dp"
android:bottom="1dp"/>
<solid
android:color="#FF000000"/>
</shape>
</item>
<item>
<shape>
<padding
android:left="5dp"
android:top="5dp"
android:right="5dp"
android:bottom="5dp"/>
<gradient
android:startColor="#FFB0B0B0"
android:centerColor="#FFFFFFFF"
android:endColor="#FFB0B0B0"
android:angle="315"/>
<corners
android:radius="3dp"/>
</shape>
</item>
</layer-list>
But my problem is, when I click on this button I have no effect or animation such as original one. Therefor, I want to add some effect on it that when user clicks on it the button becomes bigger and when released the key, the button comeback to its situation.
guide me please. thanks :)