Cannot find visible position of RecyclerView position inside NestedScrollView

How to get the first / last fully visible element in a recyclerview, if it is inside the NestedScrollView, and the recycler has nestedScrollingEnabled="false"to smoothly scroll with other views over the RecyclerView.

All these features

int findFirstVisibleItemPosition(); int findFirstCompletelyVisibleItemPosition(); int findLastVisibleItemPosition(); int findLastCompletelyVisibleItemPosition();

either return the first / last item created in recyclerView.

I want to find the current visible item because I want to scroll the RecyclerView endlessly, and I have to get the data if there are only a few items left to scroll.

thanks

+6
source share
1 answer

, , RecyclerView NestedScrollView , .

, NestedScrollView RecycelerView Horizontal RecyclerView Vertical Recycler. Recycler, , , .

+1

Source: https://habr.com/ru/post/1016492/


All Articles