I have a button that is clear with a white border, and when tapped it becomes light grey. My issue is this transition is instant and quite jarring to see. I want to learn how to smoothly flow from the one color to the other.
I have an XML file that has my button properties:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
    <shape android:shape="rectangle">
        <corners android:radius="250px" />
        <padding android:left="100px" android:right="100px" />
        <stroke android:color="#cecece" android:width="15px" />
    </shape>
</item>
<item>
    <shape android:shape="rectangle">
        <corners android:radius="250px" />
        <padding android:left="100px" android:right="100px" />
        <stroke android:color="@color/colorWhite" android:width="15px" />
    </shape>
</item>
Then the activity's button has the XML file as the background.
 
     
    