[Solved] Add items to listview from other activity
new View.OnClickListener() { public void onClick(View arg0) { EditText edit = (EditText) findViewById(R.id.tskname); Intent i = new Intent(AddTask.this, MainActivity.class); //Bundle bundle = new Bundle(); String TaskName = edit.getText().toString(); //bundle.putString(“NewTask”, TaskName); i.putExtra(“NewTask”, TaskName); i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); //i.putExtras(bundle); startActivity(i); } }); You are starting a new Activity each time you want to add an item. Consider using startActivityForResult() Link … Read more