Can't close NavigationDrawer with right-to-left swipe

后端 未结 3 935
情深已故
情深已故 2021-02-04 02:07

I have been trying to fix the problem I\'ve got, which is that I\'m unable to close the NavigationDrawer by swiping from right-to-left, without success. Opening it by swiping fr

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 02:18

    I think the XML causes your problem. The ListView (left_drawer) should be the last element in your XML so it can overlay your content and catch your swipe gesture.

    If you put your ViewPager within the FrameLayout (that's why it's called content_frame), it should work as expected.

提交回复
热议问题