Android: ViewPager gets stuck in between views

后端 未结 8 1282
天命终不由人
天命终不由人 2021-02-02 11:30

I have a ViewPager which swipes between Fragments. I\'m using a FragmentStatePagerAdapter to feed the Fragments to the ViewPager. If the user swipes left at a normal pace, and t

8条回答
  •  生来不讨喜
    2021-02-02 11:59

    Extremely late reply, but if someone is having trouble, this is what worked for me. I was wrapping the ViewPager inside View with custom styling like this:

    
    
    
    
    
    
    

    I just removed from the file and ViewPager fixed itself.

    
    
    
    
    

    so what I am saying is, try removing some other parent layout tags, maybe they are causing this problem.

    PS: this worked in react-native but I hope it helps in other realms as well.

提交回复
热议问题