I have a menu button called “Restart” which restarts a simple text game I have on the screen using ArrayLists. I’m not sure exactly how to “restart” my application so if the user wants to play a new game I can create new random variables for them and clear the screen.
The optimal code would be something that would just let me restart the application when “restart” is hit on the menu.
Any Ideas?
Thanks
onResumetoo.Create a restart method that deploys the changes in the variable.
with prototype
In the button declaration in the layout file
android:onClick="restart"