Expand RecyclerView scroll event handling
Add onFoo methods to RecyclerView for handling scroll and scroll state
change events. This gives a place for subclasses to respond to these
events without adding separate listeners. Subclass methods are always
called before listeners, giving them a chance to modify state before
listeners observe the change.
@deprecate setOnScrollListener in favor of the newly added add/remove
methods. While the set version is useful, it can be fully replaced by
the add/remove/clear methods. Apps should be careful to manage the
lifecycle of their listeners correctly and use clear only as a full
reset mechanism. Library-style components should be aware that other
components that fully "own" a view such as an adapter may clear scroll
listeners on that view.
Change-Id: I405440a00d3f9ac8c7622e6c41bd42027da5c5e2
1 file changed