I am making an gaming app that brings up an AlertDialog when the game is over. Inside the dialog, there is a positiveButton to play again.
What I would like the button to call the functions I have already made for the onCreate() method, but I do not want the functions to be static.
Here is what my onCreate method looks like:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
setup();
}
I would like to call the setup() function from the dialog.
How would one go about this?
Thanks in advance!