You have two options:
1) make a listview and two arraylists static
Thus, you can use the same instances from the action with the add button and change the list as:
FirstActivity.listTitlesArrayList.add(listTitleString); FirstActivity.listDescriptionArraylist.add(listDescriptionString);
2) if you want to use the intent:
going to ListActivity pass by .. data
intent.putExtra("Title", listTitleString); intent.putExtra("Content", listDescriptionString); startActivity(intent);
and restore it in second use:
title= getIntent().getExtras().getString("Title");
... etc.
Vicky kapadia
source share