title: Animate selector/state transitions
body: <p>I have a simple selector for my ListView</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;item android:drawable="@drawable/yellow_arc" android:state_activated="true"/&gt;
      &lt;item android:drawable="@drawable/yellow_nonarc" android:state_activated="false"/&gt;
  
  &lt;/selector&gt;
  </code></pre>
  
  <p>I want to animate the transition between these drawables when the state of the views are changed from activated to not-activated and vica versa.</p>
  
  <p>If you run the <a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List17.html">example</a> in API demos you will see an obvious fade-in/fade-out animation while the activated state of the view is changed.</p>
  
  <p>So what I want is a custom animation while the state of the view is changed. I think it should be done via xml but I couldn't find a way.</p>
  
  <p>Thanks in advance.</p>
  
  <blockquote>
    <p><strong>EDIT:</strong></p>
  </blockquote>
  
  <p>I guess I have found something useful there's a <code>activated_background.xml</code> in <code>\Android\android-sdk\platforms\android-API_VERSION\data\res\drawable</code> which includes </p>
  
  <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"
          android:exitFadeDuration="@android:integer/config_mediumAnimTime"&gt;
      &lt;item android:state_activated="true" android:drawable="@android:drawable/list_selector_background_selected" /&gt;
      &lt;item android:drawable="@color/transparent" /&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>So the example in API-demos achieveing this fade-out animation by declaring an <code>exitFadeDuration</code>. However, <strong>this is not exactly what I want</strong>.. I want to declare <strong>custom animations</strong> for the transition between the state drawables since the fade-in/fade-out animation does not look good for my drawables.</p>