重写子RV事件即可
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
/**
* Created by TU on 2019/8/27.
*/
public class RecycleScroll extends RecyclerView {
public RecycleScroll(@NonNull Context context) {
super(context);
}
public RecycleScroll(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public RecycleScroll(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent e) {
getParent().requestDisallowInterceptTouchEvent(true);
return super.onInterceptTouchEvent(e);
}
}