1You need to set layout manager
2Kotlin:
3val linearLayoutManager:LinearLayoutManager = LinearLayoutManager(this)
4linearLayoutManager.orientation = LinearLayoutManager.HORIZONTAL{or VERTICAL}
5recycleView.layoutManager = linearLayoutManager
6Java:
7LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
8linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL{or VERTICAL});
9list.setLayoutManager(linearLayoutManager);