Saving Array In Activity
<p>I have an <code>Activity</code> where names are inputed via a <code>EditText</code> box and then they get saved into an <code>Array</code> and then displayed in a <code>ListView</code> where there is also a <code>Button</code> that will appear where they can remove it.</p>

<p>Once the correct names have been added they are then passed to the next <code>Activity</code> by a <code>Button</code> <code>Intent</code> to populate a <code>String</code>. On the next <code>Activity</code> there is a button where they can go back to the previous <code>Activity</code> to add more names or remove.</p>

<p>The problem is when they go back to the previous <code>Activity</code> the <code>Array</code> is empty so I need a way to save the <code>Array</code> even when the <code>Activity</code> has been left.</p>

<p><code>ArrayList&lt;String&gt; playerList = new ArrayList&lt;String&gt;();</code></p>

<p>Button to add to the <code>Array</code> is below:</p>

<pre><code>Button confirm = (Button) findViewById(R.id.add);
confirm.setOnClickListener(new OnClickListener() {
    public void onClick(View v) {
        EditText playername = (EditText) findViewById(R.id.userinput);
        playerList.add(playername.getText().toString());
        adapter.notifyDataSetChanged();
        playername.setText("");
    }
});
</code></pre>
