需要重写上一层的recyclerview public class ParentRecyclerView extends RecyclerView { public ParentRecyclerView(@NonNull Context context) { super(context); } public ParentRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) { super(context, attrs); } public ParentRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } //不拦截,继续分发下去 @Override public boolean onInterceptTouchEvent(MotionEvent e) { return false; } }
还有其他方法 自己去查吧