Closed alexanderhudym closed 5 years ago
@alexanderhudym, try to use the adapter feature to scroll, it is asynchronous to give a small amount of time at the LayoutManager to complete the layout and only after smooth-scroll.
I've found solution!
I use it:
linearLayoutManager.scrollToPositionWithOffset(adapter.getGlobalPositionOf(Item()), 0)
scrollToPosition method of recycler view works like a: linearLayoutManager.scrollToPositionWithOffset(adapter.getGlobalPositionOf(Item()), rv.height)
I'm using 5.1.0 version of this library. When i want to scroll to header i use something like this rv.scrollToPosition(adapter.getGlobalPositionOf()) it does not scroll to needed position required header at bottom of view so i need use something like this rv.scrollToPosition(adapter.getGlobalPositionOf() + 5) to header appears at top Sorry for my bad english!