This is my first app and I’m trying to write a simple Liar’s Dice game.
I wrote everything in the main activity class, rolls random dice, textedit boxes to enter bids and buttons to bid and call.
So after the game runs, how do I get it to keep track of the score and run again?
I’ve tried making another activity screen with a restart button and have it go there after the game ends so I can restart the main activity. However I am able to press back(phonekey) from that screen and get stuck at the end of the previous game.
Also I am trying to use an array to keep track of the wins and losses but not sure how to go about bringing it back and forth from the activities.
To restart main activity you can do
and retain your data by using preferences or sqlite