Dale_Plante
Dale_Plante

Reputation: 934

How to get RecyclerView to view a certain position WITHOUT scrolling?

I'm currently working with a RecyclerView with a custom manager (found here if interested). I want to be able to change where the RecyclerView is currently "looking" (ie what position(s) are being displayed). The problem is that when I need to do this, I don't want the user to see the screen scrolling over to the other position, nor do I want to have to load each of those views along the way. So long story short, I need the RecyclerView to change what's being displayed to be positioned around a certain view, and I DO NOT want it to scroll. There is no built-in functionality for this I believe, so I'm hoping someone could give me some guidance. Thank you!

-Dale

Upvotes: 0

Views: 948

Answers (1)

Coen B
Coen B

Reputation: 715

Since RecyclerView both contains scrollTo and smoothScroll methods, I would think that scrollTo would result in a instant jump to the specified position, without scrolling.

Edited Apparently, the direct links did not work. Fixed it. Fairly new here.

Upvotes: 1

Related Questions