SLIDABLE MENU WITH NAVIGATION DRAWER - Android Fundamentals
Why Stack Overflow recommends it
Stack Overflow users link it when asking about or answering DrawerLayout and NavigationView problems, mainly as the step-by-step guide they followed to build a navigation drawer.
Recommended by 2 people across 2 different months, 2020 to 2021.
What it is
A 15-minute Android tutorial by Philipp Lackner showing how to add a slide-out Navigation Drawer to an activity, using DrawerLayout and NavigationView in Kotlin. It walks through the layout, the hamburger toggle, and handling menu item clicks with a Toast example.
What people said
Recommends Federico Zein · 2020-11 · Stack Overflow · on “Intent on NavigationDrawer”
i am trying to implement a navigationDrawer for my app. After a lot of research, i found a way that works for me. It works with the example given in this video: [this video] . In the video, they give the example with a Toast message. I am trying to create an intent instead. The problem is that i cannot do it like i am doing inside an Onclick function as they use a setNavigationItemSelectedListener. I cannot set up a val intent =when(view.id), this val i need it for making startActivity(intent) respond. In this code, no error appear but the intent inside startActivity isn't linked to a val but some weird library. I am trying to understand a way to turn around my code so it can make work my intent
Recommends LinuxDevil · 2021-08 · Stack Overflow · on “Issue with implementing a Navigation Drawer in Android Studio”
First you need to check the width of the Linear Layout , make it wrap_content . Kotlin: Here's a guide in 2020 to show you how: Medium Article [LINK] A Video Guide: [this video] Java: [LINK] Article [LINK]
Cites Meltix · 2020-06 · Stack Overflow · on “android - Implement DrawerLayout with BottomNavigationView and FrameLayout”
Im currently creating an app, which has a BottomNavigationView and a FrameLayout for fragments. I would like to implement a DrawerLayout or Hamburger Menu too, however, as said in this [this video] video A DrawerLayout should only contain two views, one for the ActivityFragment and one for the NavigationView Is it possible then to implement the DrawerLayout while having the BottomNavigationView? If yes, how? This is my activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android=" [LINK] " xmlns:app=" [LINK] " xmlns:tools=" [LINK] " android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity">
Cites Murmure · 2021-04 · Stack Overflow · on “No burger toolbar with navigation drawer”
Hello I have this message when I run my Android app (Kotlin) with drawer menu on simulator : W/ActionBarDrawerToggle: DrawerToggle may not show up because NavigationIcon is not visible. You may need to call actionbar.setDisplayHomeAsUpEnabled(true); And my top bar / burger is not visible (but the menu works if you grab it). Here is my activity code : package nameofthepackage import android.content.Context import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.view.MenuItem import android.widget.Toast import androidx.appcompat.app.ActionBarDrawerToggle import kotlinx.android.synthetic.main.activity_hub.* import kotlinx.android.synthetic
Cites Bekir · 2021-11 · Stack Overflow · on “How to highlight menu item in Android Studio?”
Thanks for you answer. I'm new to this and I'm trying to do an assignment. I watched " [this video] ". He uses and in it, I have a ConstaintLayout and I added the NavigationView to the question. I tried to implement onNavigationItemSelectedListener but that doesn't get called. I switch activity via intent in "when expression" at 13:32 in the video. I want to show the user that he is in that exact activity.