Recyclerview not call onCreateViewHolder
Your getItemCount
method returns 0
. So RecyclerView
never tries to instantiate a view. Make it return something greater than 0
.
for example
@Override
public int getItemCount() {
return data.size();
}
Another one is make sure you set layout manager to RecyclerView:
recycler.setLayoutManager(new LinearLayoutManager(this));