Every time you click your button you're re-initializing your ArrayList.
Move the array1/2 = new ArrayList<String>(); to where you're declaring the list instead.Code:array1 = new ArrayList<String>(); array1.add(plek); array2 = new ArrayList<String>(); array2.add(naam);
change
toCode:ArrayList<String> array1; ArrayList<String> array2;
and then change the first bit of code toCode:ArrayList<String> array1 = new ArrayList<String>(); ArrayList<String> array2 = new ArrayList<String>();
Code:array1.add(plek); array2.add(naam);




Reply With Quote