I read Hello Android book and i dont understand some parts of the PuzzleView class of the code. invalidate() function is redrawing only a part of page,not redrawing all the page. this is true?
The following function, why do we use invalidate() twice? what is difference between these two?
private void select(int x, int y) {
invalidate(selRect);
selX = Math.min(Math.max(x, 0), 8);
selY = Math.min(Math.max(y, 0), 8);
getRect(selX, selY, selRect);
invalidate(selRect);
}
Please help me .
Cheers