11 Sep 2012, 14:32
Generic-user-small

Fahimeh SH (4 posts)

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?

ivate 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
  You must be logged in to comment