禁止手势滑动
final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this) {
@Override
public boolean canScrollVertically() {
return false;
}
};
跳转指定位置:设置对齐方式 final LinearSmoothScroller smoothScroller = new LinearSmoothScroller(this) { @Override protected int getVerticalSnapPreference() { return LinearSmoothScroller.SNAP_TO_END; } };