Android GalleryView setCallbackDuringFling causes stutter
<p>I tried to use setCallbackDuringFling to update some indicator during Gallery fling and somehow, whenever I set it to (true), it stutters. When I say "stutter", I mean the next image jumps/snaps into view, thus the visual is very jumpy during the fling. Even when I drag it very slowly, the next image shows up, then when it's half way, it snaps into place.</p>

<p>However, if I set it to false (thus onItemSelected still get called but only once when the fling stops), the scrolling/fling is very smooth. </p>

<p>My onItemSelected (see code below) is not intensive at all, thus I suspect the stuttering is caused by something behind the scene. </p>

<p>Any idea to solve this problem?</p>

<p>Thanks in advance.</p>

<pre><code>// Set up Gallery listeners
myGallery.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {

    // When scrolling stops, set the indicators
    @Override
    public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position, long id) {

        ImageView myIV;

        // First reset myCurrentDot
        myIV = (ImageView) findViewById (myDotID[myCurrentDot]);
        myIV.setImageResource(R.drawable.grey);
        // The set the "position" dot to red
        myIV = (ImageView) findViewById (myDotID[position]);
        myIV.setImageResource(R.drawable.red);
        // update myCurrentDot
        myCurrentRedDot = position;
    }

    @Override
    public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
        // TODO Auto-generated method stub
    }
}); // End Gallery Listener
</code></pre>
