Chalk one up to the Law of Leaky Abstractions? On Apr 30, 9:19 pm, Eric <[email protected]> wrote: > On May 1, 12:01 am, Romain Guy <[email protected]> wrote: > > > If you are doing *very* frequent updates (several times per second for > > instance, with let's say a progress bar or some sort of animation) you > > should indeed modify the Views directly. > > OK. > > > Adaptor should have a > > > > notifyDatasetChangedAtIndexes(int[] indexes) at the very least, rather > > > than force the developer to update the cells manually. > > > It doesn't really matter, it wouldn't be more efficient to update cells that > > are already on screen. It would only matter when you update cells that are > > not displayed. That said you can easily just not invoke > > notifyDatasetChanged() if you are updating cells that are not between > > getFirstVisiblePosition() and getFirstVisiblePositon() + getChildCount(). > > My main point is that there is already a model-view-controller style > Adaptor in place to handle the mediation between the data and the > view, and so I would rather not have to update the View(s) directly > myself. I would rather just write my Adaptor accordingly, and have > the data-side tell it when there are fresh changes to display, and > then have the ListView decide if/when it should act on those changes > (hence the notifyDatasetChangedAtIndexes()).
-- 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

