2

I have a Scaffold with drawer and a content containing a ViewPager.

Scaffold(
    drawerLayout = { MyDrawer() },
) { innerPadding ->
   // Content with ViewPager
}

When I swipe the screen to change the page of the ViewPager, it instead opens the drawer. Can I disable this behavior and only open the drawer when swiped from the left-most part of the screen?

I tried setting gesturesEnabled of the Scaffold to false, but this also disables the swipe from the side of the screen.

danartillaga
  • 1,349
  • 1
  • 8
  • 19
  • 2
    I believe it's an issue of `Scaffold` that's why I've created an [issue](https://issuetracker.google.com/issues/197284187). I was able to help in same [question](https://stackoverflow.com/a/68773210/3585796) by creating an invisible box with padding, but this was only possible because all touch handling was done in our code and I was able to add padding before touch handling. In case with custom view this isn't possible, so lets wait for a solution from mainteiners – Phil Dukhov Aug 20 '21 at 09:51

0 Answers0