I managed to add text to the ListView, but I want to pass the ListView data to a TextView which is in another activity by clicking on the button 'Button'. I don't know how to use Serializable or Parcelable to pass data through Listview. Layout Screenshot
public void onClick(View v) {
switch (v.getId ()) {
case R.id.btnAdddata:
String result = editText.getText ().toString ();
arrayList.add(result); //add text from edittext to list
adapter.notifyDataSetChanged (); //update arraylist and notify adapter
break;
case R.id.btnNext:
Intent i = new Intent (MainActivity.this, NextActivity.class);
i.putExtra("key", (Serializable) listView_lv);
startActivity (i);
break;
}
}