Making a todo list

Hello guys , i’m new in kotlin and i’m making now a todo list app , the problem is i have two activities the first one contain the list view and the other contain an edit text to receive the data from the user, i used intent to passe the data between the two activities but if for example a created a task it’s stored on the array if i want creat another one the previous one it’s deleted
here is the image for the list view activity.kt


and this is the editext activity snap2
please some help