could someone explain navigation drawer code

The first part is just find view by id, connection the drawer to the layout and adding the icon on the toolbar.

onBackPressed part will handle the event when your drawer is open and user presses the back button, the drawer will close. If the drawer is closed then it’s going to call the super.

Browse More Popular Posts

Leave a Comment