Mark
02/01/2024, 9:05 AMModalDrawer , I noticed, with the drawer closed, the entire screen is used to detect a horizontal drag gesture to open the drawer. This is very different from androidx.drawerlayout.widget.DrawerLayout which only detects long-tap on the edge of the screen (and then pokes out a small part of the drawer to indicate drag can proceed).
The problem with ModalDrawer is that it’s way too easy to accidentally trigger opening the drawer when doing normal vertical scrolling in the main app.
I tried disabling gestures but then you don’t get the long-tap edge detection described above.
Perhaps there is a way to achieve the old behavior using anchoredDraggable modifier?Colton Idle
02/01/2024, 12:38 PMMark
02/02/2024, 1:53 AMModalDrawer been around for a few years? Hard to believe no one else experiencing this.Colton Idle
02/02/2024, 1:54 AMMark
02/02/2024, 2:11 AMColton Idle
02/02/2024, 2:11 AMMark
02/02/2024, 2:13 AMScaffold? Me neither. Have you tried using Scaffold and ModalDrawerSheet instead?Colton Idle
02/02/2024, 2:14 AMMark
02/02/2024, 2:15 AMScaffold is because I’m still using a legacy (View) AppBarLayout. I managed to hook it up to the ModalDrawer which kind of works although the hamburger icon is not animating. Also the content (screen content) is an AndroidView , though that also seems to be working.Colton Idle
02/02/2024, 2:24 AMMark
02/02/2024, 10:50 AMScaffold didn’t make any difference (at least not for M2). However this is interesting: https://stackoverflow.com/a/69457960
drawerGesturesEnabled = scaffoldState.drawerState.isOpen // Scaffold
gesturesEnabled = drawerState.isOpen // ModalDrawerMark
02/02/2024, 10:54 AMAndroidView in your screen content? See:
<https://issuetracker.google.com/issues/202569585#comment4>Colton Idle
02/02/2024, 6:33 PMMark
02/03/2024, 2:52 AMColton Idle
02/05/2024, 4:38 PMLouis Pullen-Freilich [G]
02/05/2024, 4:46 PMColton Idle
02/05/2024, 4:50 PMLouis Pullen-Freilich [G]
02/05/2024, 5:12 PMColton Idle
02/05/2024, 5:39 PMColton Idle
02/05/2024, 5:42 PMLouis Pullen-Freilich [G]
02/05/2024, 5:42 PMColton Idle
02/05/2024, 5:51 PMMark
02/06/2024, 2:05 AMColton Idle
02/06/2024, 3:35 AMColton Idle
02/06/2024, 3:35 AMMark
02/06/2024, 3:36 AMdrawerGesturesEnabled = scaffoldState.drawerState.isOpen // Scaffold
gesturesEnabled = drawerState.isOpen // ModalDrawerColton Idle
02/06/2024, 4:36 AMColton Idle
02/06/2024, 4:36 AMMark
02/06/2024, 4:43 AMColton Idle
02/10/2024, 6:12 AMColton Idle
02/15/2024, 9:14 PM