Cannot send list to Recycler View adapter Android
<p>I have an <code>ArrayList</code> and the list gets data from retrofit and its working good. The problem is when I try to send the list to <code>RecyclerView</code> adapter, its empty! Any idea ?</p>

<p>This is <strong>Activity</strong> </p>

<pre><code>public class ToDoRecycler extends AppCompatActivity {
    RecyclerView todoRecyclerView;

    private RecyclerView.Adapter todoAdapter;
    private RecyclerView.LayoutManager todoLayoutManager;
    public List&lt;ToDo&gt;results;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_to_do_recycler);


        todoRecyclerView = (RecyclerView)findViewById(R.id.todoRecyclerView);
        todoRecyclerView.setHasFixedSize(true);
        results= new ArrayList&lt;ToDo&gt;();
        todoLayoutManager = new LinearLayoutManager(this);
        todoRecyclerView.setLayoutManager(todoLayoutManager);
        todoRecyclerView.setAdapter(todoAdapter);
        todoAdapter = new TodoRecyclerAdapter(this,results);
        getRetrofitObject();
        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(ToDoRecycler.this,AddToDo.class);
                startActivity(intent);
            }});}

   public void getRetrofitObject() {
        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl(BASE_URL)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
        APIService service = retrofit.create(APIService.class);
        Call&lt;Result&gt; call = service.getresults();
        call.enqueue(new Callback&lt;Result&gt;() {
            @Override
            public void onResponse(Call&lt;Result&gt; call, Response&lt;Result&gt; response) {
                results = response.body().getResults();
            }
            @Override
            public void onFailure(Call&lt;Result&gt; call, Throwable t) {
                Log.d("onFailure", t.toString());
            }});}
}
</code></pre>

<p>Adapter</p>

<pre><code>public class TodoRecyclerAdapter  extends RecyclerView.Adapter&lt;TodoRecyclerAdapter.ViewHolder&gt; {
static List&lt;ToDo&gt; todoResults;
static Context context;
List&lt;ToDo&gt;results;
public TodoRecyclerAdapter(List&lt;ToDo&gt; results) {
    this.todoResults = results;
}
@Override
public TodoRecyclerAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View itemLayoutView = LayoutInflater.from(parent.getContext()).inflate(R.layout.todo_items, null);
    ViewHolder viewHolder = new ViewHolder(itemLayoutView);
    return viewHolder;
}
@Override
public void onBindViewHolder(final TodoRecyclerAdapter.ViewHolder holder, final int position) {


}

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


public static class ViewHolder extends RecyclerView.ViewHolder {
    public TextView todoTitle;

    public ViewHolder(View itemLayoutView) {
        super(itemLayoutView);
        todoTitle = (TextView) itemLayoutView.findViewById(R.id.todo_title);
    }
}
}
</code></pre>