Really? *immediately*? I thought that invalidate() must be called on the UI thread. But invalidate() does not draw your view *immediately*, does it? I thought it will schedule a draw 'action' as soon as the UI-message thread gets a chance. If you call multiple invalidate()-s in a row, your view is redrawn only once (all the invalidate-rects are gathered and the redraw is using the union of all these rects).
The postInvalidate() can be called from a non UI-thread. It just posts an invalidate() on the UI-thread. On Jun 18, 3:49 pm, Romain Guy <[email protected]> wrote: > > What is the difference between invalidate() and postInvalidate(), > > except the obvious (I know that postInvalidate post an invalidate- > > request on the UI-thread, while a call to invalidate() invalidates the > > View immediately). > > Just what you said :) > > -- > Romain Guy > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

