package com.example.todocloud.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.todocloud.R;
import com.example.todocloud.data.Todo;

import java.util.List;

public class TodoAdapterTest extends RecyclerView.Adapter<TodoAdapterTest.MyViewHolder> {

  private List<Todo> todosList;

  public TodoAdapterTest(List<Todo> todosList) {
    this.todosList = todosList;
  }

  @Override
  public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View itemView = LayoutInflater.from(parent.getContext())
        .inflate(R.layout.todo_item, parent, false);

    return new MyViewHolder(itemView);
  }

  @Override
  public void onBindViewHolder(MyViewHolder holder, int position) {
    Todo todo = todosList.get(position);
    holder.title.setText(todo.getTitle());
  }

  @Override
  public int getItemCount() {
    return todosList.size();
  }

  public class MyViewHolder extends RecyclerView.ViewHolder {

    public TextView title;

    public MyViewHolder(View itemView) {
      super(itemView);
      title = (TextView) itemView.findViewById(R.id.tvTitle);
    }

  }

}

@@ -279,16 +279,44 @@
 .Todo;%0A%0A
+import java.util.ArrayList;%0A
 import j
@@ -537,24 +537,152 @@
 sList;%0A  %7D%0A%0A
+  public void updateDataSet(ArrayList%3CTodo%3E todosList) %7B%0A    this.todosList.clear();%0A    this.todosList.addAll(todosList);%0A  %7D%0A%0A
   @Override%0A

Add updateDataSet method