You must create an XML file for your list selector that you place in /drawable-nodpi
and adjust the values of android:enterFadeDuration
and android:exitFadeDuration
to your desired fade animation duration.
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:enterFadeDuration="@android:integer/config_mediumAnimTime" android:exitFadeDuration="@android:integer/config_mediumAnimTime">
<item android:drawable="@color/a_lighter_green_color" android:state_focused="true" android:state_pressed="false"/>
<item android:drawable="@color/your_green_color" android:state_pressed="true"/>
<item android:drawable="@android:color/transparent"/>
</selector>
Please note that with this technique, which is the proper way to do it, the animation will only be visible on API level 11 and above (Android 3+), but today it means more than 80% of devices. Older devices will see the correct color but no fade animation.