RecyclerView dont call OnCreateViewHolder, OnBindViewHolder, GetItemCount() : <p>in this code, I used breakpoints on each line of <strong>RecyclerView Class</strong> but the only constructor of this class is called, no more function(OnCreateViewHolder, OnBindViewHolder, GetItemCount(), etc) is being called<a href="https://i.stack.imgur.com/1Z3k2.png" rel="nofollow noreferrer">enter image description here</a>. Images from LogCat has also been uploaded...</p>

<p><strong>MainActivity</strong></p>

<pre><code>package com.example.admin.recyclerview;
import android.provider.ContactsContract;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import java.util.ArrayList;

public class MainActivity extends AppCompatActivity {
    RecyclerView recyclerView;
    RecyclerView.Adapter adapter;
    RecyclerView.LayoutManager layoutManager;
    String[] titles;
    String[] description;
    int[] images = {R.drawable.facebook, R.drawable.instagram, R.drawable.twitter, R.drawable.google};
    ArrayList&lt;DataProvider&gt; arrayList = new ArrayList&lt;DataProvider&gt;();

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

        recyclerView = findViewById(R.id.recyclerView);
        titles = getResources().getStringArray(R.array.titles);
        description = getResources().getStringArray(R.array.description);
        int i = 0;
        for(String name : titles){
            DataProvider dataProvider = new DataProvider(images[i], titles[i], description[i]);
            arrayList.add(dataProvider);
            i++;
        }

        adapter = new RecyclerAdapter(arrayList);
        recyclerView.setHasFixedSize(true);
        layoutManager = new LinearLayoutManager(this);
        recyclerView.setAdapter(adapter);
    }
}
</code></pre>

<p><strong>RecyclerView Class</strong></p>

<pre><code>package com.example.admin.recyclerview;

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

import java.util.ArrayList;

public class RecyclerAdapter extends RecyclerView.Adapter&lt;RecyclerAdapter.RecyclerViewHolder&gt; {

    private ArrayList&lt;DataProvider&gt; arrayList = new ArrayList&lt;DataProvider&gt;();

    public RecyclerAdapter(ArrayList&lt;DataProvider&gt; arrayList){
        this.arrayList = arrayList;
    }

    @Override
    public RecyclerViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
        View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.row_layout, viewGroup, false);
        return new RecyclerViewHolder(view);
    }

    @Override
    public void onBindViewHolder(RecyclerViewHolder recyclerViewHolder, int i) {
        DataProvider dataProvider = arrayList.get(i);
        recyclerViewHolder.imageView.setImageResource(dataProvider.getImage_res());
        recyclerViewHolder.title.setText(dataProvider.getTitle());
        recyclerViewHolder.description.setText(dataProvider.getDescription());
    }

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

    public static class RecyclerViewHolder extends RecyclerView.ViewHolder{
        ImageView imageView;
        TextView title;
        TextView description;

        public RecyclerViewHolder(@NonNull View itemView) {
            super(itemView);
            imageView = itemView.findViewById(R.id.icon);
            title = itemView.findViewById(R.id.title);
            description = itemView.findViewById(R.id.description);
        }
    }
}
</code></pre>

<p><strong>DataProvider</strong></p>

<pre><code>package com.example.admin.recyclerview;

public class DataProvider {
    private int image_res;
    private String title;
    private String description;


    public DataProvider(int image_res, String title, String description) {
        this.image_res = image_res;
        this.title = title;
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getImage_res() {
        return image_res;
    }

    public void setImage_res(int image_res) {
        this.image_res = image_res;
    }
}
</code></pre>
