Arraylist elements starting too much activity
<p>I am developing an application, that sends a string array with putStringArrayListExtra. In the second activity I am receiving. The problem, if I send 2 item, 2 activity will open. The second element is on the listview(shows just one), when i click back, there is now the first item. I want the 2 item in the SAME listview. What am I doing wrong?</p>

<p>First activity</p>

<pre><code>final int len = thumbnailsselection.length;
            int cnt = 0;
            String selectImages = "";
           // String result = "";
            String ar="";


            for (int i =0; i&lt;len; i++)
            {
                if (thumbnailsselection[i])
                {
                    cnt++;
                    ar = nev[i];
                    selectImages = nev[i] + "|";
                   // List&lt;String&gt; myList = new ArrayList&lt;String&gt;(Arrays.asList(selectImages));
                   ArrayList&lt;String&gt; arr = new ArrayList&lt;String&gt;();
                    arr.add(selectImages);

                   Intent intent = new Intent(Gallery.this,Upload.class);
                    intent.putStringArrayListExtra("array_list", arr);

                    startActivity(intent);

                    // Log.i("adat","galleri:" + arr);





                }

            }
            if (cnt == 0){
                Toast.makeText(getApplicationContext(),
                        "Please select at least one image",
                        Toast.LENGTH_LONG).show();
            } else {





                Toast.makeText(getApplicationContext(),
                        "You've selected Total " + cnt + " image(s).",
                        Toast.LENGTH_LONG).show();

            }
        }
    });
</code></pre>

<p>Second activity</p>

<pre><code>ListView listView;

ArrayAdapter&lt;String&gt; adapter;



@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_upload);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    listView = (ListView) findViewById(R.id.list);

    Bundle b = getIntent().getExtras();


       // ArrayList&lt;String&gt; arr = (ArrayList&lt;String&gt;)b.getStringArrayList("array_list");
    ArrayList&lt;String&gt; arr = b.getStringArrayList("array_list");
        Log.i("adat","UPLOAD:"+arr);


    ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_list_item_1, android.R.id.text1, arr);
    listView.setAdapter(adapter);

    }
</code></pre>