I have a RecyclerView with a LinearLayoutManager and i want to scroll it programmatically using the smoothScrollToPosition, but I don't want the user to be able to scroll by swiping over it. Is there anyway to do so? i've already tried overriding the canScrollHorizontally() of the layout manager but it also disables the programmatically scrolling.
Asked
Active
Viewed 111 times
1
Vinicius Souza
- 21
- 3
-
You'll need to subclass RecyclerView and override a method: https://stackoverflow.com/a/37326314/7434090 – Gavin Wright Aug 31 '20 at 13:55