Check whether a RecyclerView needs to scroll
<p>I have a callback that is fired after a programmatic scroll to a certain item of a RecyclerView via <code>LinearLayoutManager.smoothScrollToPosition()</code>. The user taps on an item and the right item is scrolled to the top of the RecyclerView. I subclassed LinearLayoutManager to have it always snap to the top of the item.<br>
This works in case the scroll event is fired, but when the RecyclerView is already in the right position, I don't get the <code>onScrollStateChanged</code> callback, as no scrolling occurs. Is there a way to get that event anyway? Like decide beforehand whether or not the RecyclerView needs to scroll or not?</p>