Android animate background image
<p>I have one Relative Layout and i have set it's background as drawable, which is a selector.   </p>

<p>There are total tow background to this Relative Layout and one is in state as selected and one is in non selected mode, both the states are handled in the drawable selector xml file.  </p>

<p>What i want to implement is when selector switch the background image from selected to not selected  or vice-versa i want to display fade in/out animation. </p>

<p>I found out that i need to use <code>android:exitFadeDuration="@android:integer/config_mediumAnimTime</code> for implementing this in xml file but i am using Android API level 8 and it does not have this property.  </p>

<p>So do i need to implement this in java code, how should i implement this in java?<br>
Is there any other option to implement it in xml?   </p>

<p>Thanks.</p>
