Android Dev: AlertDialog with SurfaceView
<p>I am developing an Android game and I have my SurfaceView rendering the game and I want to make it so when the player loses or wins an AlertDialog pops up and either restarts the level or whatever.</p>

<p>Basically I have two questions:</p>

<ol>
<li><p>How do I use AlertDialogs with SurfaceViews? Do I have to put it into the layout.xml or does it get coded into the UI part or the game thread part?</p></li>
<li><p>Is there a way to "restart" an activity so it doesn't make a new one just starts the current one over with the same "intent" it was given originally?</p></li>
</ol>

<p>Thank You!</p>
