Change layout view but lose data when return!
<p>So I am writing an app for a golfer's scorecard. I setup a view for player1, initialise buttons and edit text and text view etc. I then can click to see next player and it does something similar for player 2. This all works fine - entering scores etc and seeing them on the screen. If, however, I try to go back to player1's view none of the data that was on the screen is there anymore. The textview, edit text boxes havent been "saved" if you like....why is this and how can I correct this?</p>

<p>Pseudo code below:</p>

<pre><code>//Set up player 1 view
SetContentView(R.layout.player1);
//Initialise click listeners and buttons etc
initialiseClickListeners();
//setup EditText and Textviews
enterScore();

//if click on next player button then initialise buttons and boxes for player 2
SetContentView(R.layout.player2);
//Initialise click listeners and buttons etc
initialiseClickListeners();
//setup EditText and Textviews
enterScore();

//if click on next player button and there are no more players go back to player1
SetContentView(R.layout.player1);
//dont initialise buttons etc
</code></pre>

<p>WHY is the data that I had entered on view player1 not there anymore?</p>
