Get complete courses at http://courses.caveofprogramming.com

Our game is going to start up when the view surface is created, and stop (or pause) when the drawing surface is destroyed; so for that we need to know how to detect surface creation and destruction events.