【链接】
(1)https://blog.csdn.net/zhangphil/article/details/82803528 (LinearSnapHelper)
(2)https://www.jianshu.com/p/bcbdaf09233e (PagerSnapHelper)
【知识】
SnapHelper的实现原理是监听RecyclerView.OnFlingListener中的onFling接口。LinearSnapHelper&PagerSnapHelper是抽象类SnapHelper的具体实现。
【重要代码】
mLinearSnapHelper = new LinearSnapHelper();
mLinearSnapHelper.attachToRecyclerView(mRecyclerView);