AlertDialog in SurfaceView
<p>In my surfaceView class I have a AlertDialog with 2 buttons that allows the user to restart or exit the application when they lose. I used the code from the android website on creating dialogs. When ever the health drops to 0, the app forcecloses. I am wandering how it is I would go about setting it up to where it doesn't crash and allows me to restart or exit the app depending on what option I choose.</p>
