Closed Sternbach-Software closed 2 years ago
Thank you for the report @shmueldabomb441
Wouldn't a normal listener on the DrawerLayout
(e.g. after the layout is closed) also serve the same functionality?
Also I wonder, why did you not close the keyboard when the DrawerLayout
was opened already?
Because when setting it up with the navigation component, the onclick listener is set to deal with the navigation, so setting it myself would be counter productive. It is a single listener, not an array of listeners.
Also, it isn't certain that the user will navigate just when the open the drawer. They could be checking the email in the header or something.
I'd argue that the common approach is to close the keyboard when opening the drawerLayout: https://developer.android.com/reference/androidx/drawerlayout/widget/DrawerLayout.DrawerListener
Will need to think more about adding another listener
How would you do it like you're saying while allowing it to set up the listener for the Navigation component? I can hear where you are coming from, because the keyboard may block the user from one of the list items, in which case they will close it themselves anyway, so the app might as well do it for them.
Decided to get this listener added, dropped a commit though as it contained unused code, and added backwards compatiblity.
This will land in v9
About this issue
EditText
and the keyboard should not be opened. I am using the Navigation component. A solution would be to allow passing in a lambda foronSuccessfulNavigation
toMaterialDrawerSliderView.setupWithNavController()
instead of just afallBackListener
Details
Checklist