I\'m trying to write a code for endless scroll on a recycler view. This is the snippet that gives me a compiler error:
@Override
public void onSc
mLayoutManager is an object of class RecyclerView.LayoutManager is wrong, you should use android.support.v7.widget.LinearLayoutManager for mLayoutManager, so:
mLayoutManager = new LinearLayoutManager(this);
//above 'LinearLayoutManager' is from
//'android.support.v7.widget.LinearLayoutManager'
mRecyclerView.setLayoutManager(mLayoutManager);
then mLayoutManager.findFirstVisibleItemPosition(); call should be ok in onScrolled(...);.
Hope this help!