Android: How to invalidate multiple parts of screen
Posted
by user342731
on Stack Overflow
See other posts from Stack Overflow
or by user342731
Published on 2010-05-17T04:05:28Z
Indexed on
2010/05/17
4:10 UTC
Read the original article
Hit count: 251
I need to be able to selectively invalidate multiple (about 20) rectangles on the screen for performance reasons, so tried the following:
Vector<Rect> myRects = new Vector<Rect>();
// ... add some Rects to myRects
for (Rect r : myRects) {
invalidate(r);
}
However this seems to invalidates a union of all the Rect
's, forming one large rectangle which covers all of small ones I'm trying to invalidate.
How can one invalidate multiple areas on the screen, and only those areas?
© Stack Overflow or respective owner