3

My recyclerview inside NestedScrollView view and recyclerview addOnScrollListener is not working but I need to get recyclerview current visible item position
My experment

I use "layoutmanager.findLastVisibleItemPosition()" this code but it always showing last position only
Is there any way to enable addOnScrollListener in recyclerview if it is inside NestedScrollView

This case is not similar to Get visible items in RecyclerView this question please read carefully
The solution provided in that post is working if it is not inside NestedScrollView

Tanveer Munir
  • 1,956
  • 1
  • 12
  • 27

1 Answers1

-2

If I got you right, you would probably want to add a linear layout inside the scroll view, and in the linear layout add the recycler. There your addOnScrollListener supposed to work.

Another option here. You might want to check this answer- there it's recommended to switch the scroll view with NestedScrollView .

Daniel Reyhanian
  • 579
  • 4
  • 26