In the previous question of the questioner, I mentioned that this problem is actually about the understanding of touch event distribution. Google the distribution mechanism of touch events, and then you can look back at this issue after understanding it. Hope this helps!
Rewrite ViewPager
isScrollable is whether sliding is allowed, preventing Viewpager events, and child controls can also respond to events
Rewrite touch events to cancel left and right sliding. Note that the overridden object is ViewPager, not Activity.
In the previous question of the questioner, I mentioned that this problem is actually about the understanding of touch event distribution. Google the distribution mechanism of touch events, and then you can look back at this issue after understanding it. Hope this helps!
Rewrite ViewPager as follows