Using exitFadeDuration cause flickering for list view custom selector
<p>I have a single selection <code>ListView</code>, with each row having selector. The selector behavior is as follow. Note, the <code>ListView</code> itself also placed on a white color <code>LinearLayout</code>.</p>

<ol>
<li>During normal state, the row will be white color.</li>
<li>During "selecting process", I want to let the system to handle the coloring. So, I mark them as transparent.</li>
<li>When a row item is being selected, I want the highlight color to be blue.</li>
<li>I would like to have some animation when I select from this row to that row, so I'm having <code>android:exitFadeDuration</code></li>
</ol>

<p>Here is how my selector looks like</p>

<pre><code>&lt;selector android:exitFadeDuration="@android:integer/config_mediumAnimTime" 
    xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item android:state_activated="true" android:drawable="@drawable/blue" /&gt;

    &lt;!-- http://stackoverflow.com/questions/2217753/changing-background-color-of-listview-items-on-android --&gt;
    &lt;item android:state_pressed="true" android:drawable="@android:color/transparent" /&gt;     &lt;!-- pressed --&gt;
    &lt;item android:state_focused="true" android:drawable="@android:color/transparent" /&gt;     &lt;!-- focused --&gt;
    &lt;item android:state_selected="true" android:drawable="@android:color/transparent" /&gt;    &lt;!-- selected --&gt;

    &lt;item android:drawable="@drawable/white" /&gt;
&lt;/selector&gt;
</code></pre>

<p>When I perform selection through Java code, the fading animation effect looks perfect</p>

<pre><code>    // Highlighting.
    listView.performItemClick(getListView().getAdapter().getView(index, null, null), index, index);
    listView.post(new Runnable() {
        @Override
        public void run() {
            listView.setSelection(index);
        }
    }
</code></pre>

<p><strong>However, if I perform manual selection by clicking on the <code>ListView</code> explicitly, I can see a slightly flickering effect!</strong></p>

<p>May I know why is it so? Is there any way I can avoid this? I realize even I change the transparent state to</p>

<pre><code>&lt;item android:state_pressed="true" android:drawable="@drawable/blue" /&gt;     &lt;!-- pressed --&gt;
&lt;item android:state_focused="true" android:drawable="@drawable/blue" /&gt;     &lt;!-- focused --&gt;
&lt;item android:state_selected="true" android:drawable="@drawable/blue" /&gt;    &lt;!-- selected --&gt;
</code></pre>

<p>flickering still happen. Note, flickering effect won't be there if there is no <code>android:exitFadeDuration</code>. However, removing <code>android:exitFadeDuration</code> is not something I want.</p>
