In the case of SimpleCursorAdapter, I'd expect that in the vast
majority of cases the Cursor's result set does not change at all. Even
so, a requery is likely to be orders of magnitude slower than such a
post invalidate.

So the choice is between the occasional force close and the occasional
slight delay in ListView refreshing.

I'm sure I've often seen listener calls being posted to handlers
rather than called directly??? I use this approach sometimes if there
is a risk of nasty cyclic behaviour.

IMHO, it also makes sense when implementing such list adapters.

On Apr 9, 10:31 pm, Mark Murphy <[email protected]> wrote:
> westmeadboy wrote:
> > Does it not make more sense for the adapter to post the invalidate (on
> > the UI thread) rather than invalidate directly?
>
> They probably don't do that for efficiency reasons. I suspect that the
> vast majority of cases, the CursorAdapter *is* being modified on the UI
> thread.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Consulting:http://commonsware.com/consulting

-- 
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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to