ListView will refresh already existing item and won’t add a new one

I am trying to make a To Do List app and I have an EditText field where I enter the task. When I press the “add” floating action button the first task goes in the listview perfectly but when I try to add a second task, it will change the first task to the second and so on. So the thing is that I can only have on task at a time but what I want to have is a list of tasks.

This is my onCreate method, where I declare the floating action button and set an OnClickListener for it:

DBHelper dbHelper;
ArrayAdapter mAdapter;
ListView listView;
protected void onCreate(Bundle savedInstanceState) {
    // Finds you button from the xml layout file
    FloatingActionButton faButton = (FloatingActionButton) findViewById(;

    // Waits for you to click the button
    faButton.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            // Starts the function below
    listView = (ListView)findViewById(;

And this is the method that adds the task from the EditText to the ListView

ArrayList taskList;
public void addToDoElement(View view) {
    listView = (ListView) findViewById(;
    taskList = new ArrayList<>();
    mAdapter = new ArrayAdapter(this, R.layout.row,, taskList);


    //Gets TASK text from EditText
    EditText mEdit   = (EditText)findViewById(;
    Log.v("EditText", mEdit.getText().toString());



All topic