How to close navigation drawer when an item is pressed from it?

Vipul J

Ideally navigation drawer should get closed once some item has been pressed from it, but its not happening automatically. How to do it ? Thanks!

Vipul J

Got it!

private DrawerLayout mDrawerLayout;
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerLayout.closeDrawers();

Working perfectly fine.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Close Navigation Drawer on back pressed

From Dev

Close Navigation Drawer on Back Button Pressed in Flutter

From Dev

How to select item navigation drawer from fragment

From Dev

How do I close a navigation drawer after an item is selected?

From Dev

How do I close a navigation drawer after an item is selected?

From Dev

open navigation drawer when options icon pressed

From Dev

Button beneath navigation drawer not working when pressed

From Dev

Navigation drawer force close from activity, how to fix it?

From Dev

How to close drawer menu when click on item menu?

From Dev

How to generate Navigation Drawer item's dynamically from xml?

From Dev

close navigation drawer after clicking on any of its item

From Dev

could i close an app whit list item in navigation drawer?

From Dev

Open navigation drawer when options menu button is pressed

From Dev

Unfortunately stopped when button pressed in android navigation drawer

From Dev

Navigation Drawer twitches on close

From Dev

How to pass data to navigation drawer item?

From Dev

Navigation drawer: How to know the current selected item?

From Dev

How to hide a navigation drawer menu item programmatically?

From Dev

How to add action to a Navigation Drawer item?

From Dev

How to add a link to a navigation drawer item?

From Dev

How to add Spinner as an item in Navigation Drawer

From Dev

Navigation Drawer: How to change the colour of item category?

From Dev

Drawer NavigationView + Fragments with viewpager, how to avoid caching data when switching fragments in navigation drawer from one to another?

From Dev

When back button is pressed and navigation drawer is open, my app closes instead of closing drawer

From Dev

Add a item to a navigation drawer

From Dev

Navigation Drawer is not opening when sliding from left

From Dev

How to NOT close keyboard when DONE on keyboard is pressed

From Dev

How to close navigation drawer through touch on the Screen in android

From Dev

How to make navigation drawer toggle forcibly close all the time

Related Related

  1. 1

    Close Navigation Drawer on back pressed

  2. 2

    Close Navigation Drawer on Back Button Pressed in Flutter

  3. 3

    How to select item navigation drawer from fragment

  4. 4

    How do I close a navigation drawer after an item is selected?

  5. 5

    How do I close a navigation drawer after an item is selected?

  6. 6

    open navigation drawer when options icon pressed

  7. 7

    Button beneath navigation drawer not working when pressed

  8. 8

    Navigation drawer force close from activity, how to fix it?

  9. 9

    How to close drawer menu when click on item menu?

  10. 10

    How to generate Navigation Drawer item's dynamically from xml?

  11. 11

    close navigation drawer after clicking on any of its item

  12. 12

    could i close an app whit list item in navigation drawer?

  13. 13

    Open navigation drawer when options menu button is pressed

  14. 14

    Unfortunately stopped when button pressed in android navigation drawer

  15. 15

    Navigation Drawer twitches on close

  16. 16

    How to pass data to navigation drawer item?

  17. 17

    Navigation drawer: How to know the current selected item?

  18. 18

    How to hide a navigation drawer menu item programmatically?

  19. 19

    How to add action to a Navigation Drawer item?

  20. 20

    How to add a link to a navigation drawer item?

  21. 21

    How to add Spinner as an item in Navigation Drawer

  22. 22

    Navigation Drawer: How to change the colour of item category?

  23. 23

    Drawer NavigationView + Fragments with viewpager, how to avoid caching data when switching fragments in navigation drawer from one to another?

  24. 24

    When back button is pressed and navigation drawer is open, my app closes instead of closing drawer

  25. 25

    Add a item to a navigation drawer

  26. 26

    Navigation Drawer is not opening when sliding from left

  27. 27

    How to NOT close keyboard when DONE on keyboard is pressed

  28. 28

    How to close navigation drawer through touch on the Screen in android

  29. 29

    How to make navigation drawer toggle forcibly close all the time

HotTag

Archive