Based on Android documentation:
Never add a RecyclerView or ListView to a scroll view. Doing so results in poor user interface performance and a poor user experience.
The best new way is to use MergeAdapter. It added to Recyclerview v1.2.0alpha. So add this dependency:
implementation "androidx.recyclerview:recyclerview:1.2.0-alpha03"
If you want to put two Adapters in one recyclerView, follow this Guide:
then make an instance of MakeAdapter and pass your adapters on it then set it as RecyclerViewAdapter:
MergeAdapter ma = new (firstAdapter, secondAdapter);
myRecyclerView.setAdapter(ma);
If you have a layout and Pagedlist, follow this Guide:
Then Make and Simple ViewHolder and put the first layout on it. Then make MergeAdapter then add your layout's adapter and then PagedList's adapter, then add adapter of PagedList:
MergeAdapter ma = new MergeAdapter();
ma.addAdaper(simpleAdapter);
ma.addAdapter(pagedListAdapter);
then set this mergeAdapter to recyclerView's adapter;
myRecyclerView.setAdapter(ma);