I have this code:
recyclerView.setOnScrollChangeListener(this);
The problem is that android studio Call requires API level 23 (current min is 15)
I found similar questions but with no right answer.
how can I solve this error?
I have this code:
recyclerView.setOnScrollChangeListener(this);
The problem is that android studio Call requires API level 23 (current min is 15)
I found similar questions but with no right answer.
how can I solve this error?
You could try implementing an onScrollListener
instead. This is dependent on what you are implementing in your scroll events but if you are simply looking for something that is backward compatible to your min of 15 this would be the choice:
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
// onScrollStateChanged will be fire every time you scroll
// Perform your operation here
}
}