On Apr 29, 3:37 pm, Dianne Hackborn <[email protected]> wrote: > On Fri, Apr 29, 2011 at 3:20 PM, Eric <[email protected]> wrote:
> Ah. If you are doing an actual data change, the list view needs to rebuild > the list at that point, and likely the touch will be lost. You really don't > want to be doing a big data update every second for numerous reasons: it is > expensive so causes a lot of CPU use, it will result in non-smooth scrolling > since all of the views being shown in the list need to be rebuilt each time, The same app performs absolutely fine on the iPhone. The Android version is not performing too badly. This is a realtime trading application. It needs to update at least once a second. Our iPhone app updates 2-3 times per second. > if your data is actually changing that much then it will be changing > continually on the user (including items potentially moving around) which is > not a good UX I don't understand this comment at all. , and finally since all of the views are being rebuilt the one > the user is currently touching is likely to be rebuilt and the current touch > lost. How can the touch possibly be lost if both the redraw of the list view, and the touch, are happening on the main UI thread? > > A list view is definitely not the way to show "real time" data like this. > If the items *inside* of the list view want to update at a frequent rate to > show new data they can certainly do that by just changing their visuals, but > you don't want to tell the list view that your data set has changed because > then it needs to throw all of its current views away, retrieve the new data, > and bind that data to new views. We can't really do that. Many of the screens in the app show market depth, and the depth changes update-by-update. You need to redraw the entire list every time. -- 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

