How To Repaint Canvas In Android

Unlike Swing where it repaints any code placed inside the paint() method automatically, Android works in a different way.

I thought at first the Canvas class works the same way as in Swing container classes but they do not. If you wish to repaint the contents of the whole Canvas, you only need to call invalidate().

That’s it.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *