Home > Mobile > Two transverse sliding ViewPager2 nested conflict how to solve?
Two transverse sliding ViewPager2 nested conflict how to solve?
Time:09-15
problem scenario : using TabLayout MainActivity + ViewPager2 made a transverse sliding fragments page switching function, In one of the fragments also USES a ViewPager2 (horizontal), used to turn the contents of the infinite (similar to trill, however is horizontal, vertical effect is not good, I this to lateral), & nbsp; map :
Problem of : when display Fragment1, fingers in Fragment1 ViewPager2 sliding, I want to trigger this slide, trigger is ViewPager2 sliding in the Activity, however, ViewPager2 is final class cannot copy, source of isUserInputEnabled () to True onInterceptTouchEvent will intercept, someone give me method is when Fragment1 showed that the Activity of ViewPager2 isUserInputEnabled () is set to False, but I need in other areas of the Fragment1 except ViewPager2 and can trigger Activity in ViewPager2 sliding, Can you tell me how to solve?