Navigation Drawer with Fragments Part 3 – HANDLING MENU ITEM CLICKS – Android Studio Tutorial

In part 3 of the navigation drawer tutorial, we will create 3 fragments and their corresponding layout files. Then we implement the OnNavigationItemSelectedListener interface into our MainActivity and set it as the listener on our NavigationView to handle click events on our menu items. For our 3 main items we will open the corresponding fragment with the getSupportFragmentManager and beginTransaction methods, and for the other 2 items we will simply show a toast message.

Watch the whole playlist:

Example code + dependency:

Part 3 – Fragments

❗ Subscribe to the channel:

⏯ Watch more tutorials:

㊙ Help translating the videos:

💚 Support the content:

Support the Content

💬 Join the Discord chat:

🎧 Audiobooks and podcasts for programmers:

5 Audiobooks and Podcasts That Help You Become a Better Programmer While Washing the Dishes

👶 How to get started with Android development:

How to Learn Android Development as a Complete Beginner

📣 Follow Coding in Flow on social media:







Build A Site Info