IMHO the list view doesn't shuffle the rows around, but the views that form these rows are re-used in order to avoid the repeated inflation of the views. Instead you get a previously setup view and you only do the data binding, i.e. set the actual values from your model in the views's text fields, bitmaps etc..
However it would only re-use a view that previously was scrolled out of the viewable part of the list. So when your transitions are gone before the view is scrolled out, no jumping should occur as the view cannot be seen anymore. This view might be re-used though by the next view (row) that gets scrolled in and when the animation still runs on it then you would still see it. You could reset the animation before re-using the view. That might have the drawback that an item with a slowly fading background is scrolled out while the transition is in progress and then scrolled in again, also while the transition is still in progress, but as you just reset the animation before the re-use you won't see it anymore. Am I making any sense? Maybe, if your views are very simple, you don't need to re-use them anyway and still have a good performance? Before going into more detail it may make sense for you to checkout those "convert views". http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html On Fri, Jun 25, 2010 at 5:58 PM, Daniel Lew <[email protected]> wrote: > Back when I originally wrote my app, I thought I could use some tricks > with TransitionDrawable to briefly highlight some rows in a ListView. > However, when I actually implemented this (a fading background), the > background would jump from item to item randomly. > > As my knowledge of Android has progressed, I've learned why this no > longer works: the ListView uses optimizations and actually shuffles > rows around, so the row that I may have originally told to animate > ends up placed in a different spot by the time the ListView is > visible. > > My question is whether there's a solution to this problem. I've > thought of using a different view type, but that would only work if I > can turn *off* the view type for that row at the right time; since I'm > using a TransitionDrawable, there's no way for me (right now) to mark > once the animation is done. > > Does anyone have any ideas on how to make a temporary fading > background on particular rows in a ListView? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

