I have an Android Button:
<Button
android:layout_width="wrap_content"
android:layout_height="44dp"
android:background="@drawable/action_button" />
action_button.xml
is:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<padding
android:left="25dp"
android:right="25dp"/>
<gradient
android:angle="0"
android:endColor="@color/whiteColor"
android:startColor="@color/whiteColor"/>
<corners android:radius="@dimen/borderRadius"/>
<stroke
android:width="2px"
android:color="@color/actionColor"/>
</shape>
How can I change the shape, when the button is pressed?