I'm sending a string from one Activity to another Activity with putExtras and getExtras. Then I displaying this string to a TextView. When I go back and choose another string it ovewrites the previous string in TextView. I want to place the new string in a new line in textView. How to do this? (I'm sending strings with a button) This is my code in the recieve Activity:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_completed_tasks);
TextView completedTasksView = (TextView)findViewById(R.id.completed_tasks);
Intent intent = getIntent();
String completedTasks = intent.getExtras().getString("completedTasks");
completedTasksView.setText(completedTasks);
}
}