Navigation Drawer with Navigation Component - Android Studio Tutorial
ฝัง
- เผยแพร่เมื่อ 13 ก.ย. 2024
- 🏆 My Online Courses
⭐Discount Coupon: LAUNCH-STEVDZA-SAN
stevdza-san.com
🐱👤 Wanna become a member? Join!
/ @stevdzasan
📸 Instagram
/ stevdza_san
The navigation drawer is a UI panel that shows your app's main navigation menu. The drawer appears when the user touches the drawer icon in the app bar or when the user swipes a finger from the left edge of the screen.
The drawer icon is displayed on all top-level destinations that use a DrawerLayout.
To add a navigation drawer, first declare a DrawerLayout as the root view. Inside the DrawerLayout, add a layout for the main UI content and another view that contains the contents of the navigation drawer.
Navigation Component: • Navigation Component -...
Safe Args: • Safe Args with Navigat...
Absolutely loved your video...Other videos of 30 minutes and 40 minutes just shows the procedure without explaining...I understood really well...Thanks a lot
Thx bro (from Stevdza-San)
All your tutorials are useful for who are already familiar with Android development but beginners like me it was very hard to catch-up.
That's why I will make full courses on Android Development in the future, because there are so many details to cover, and it's impossible with just one video.
@@StevdzaSan I am eagerly waiting for that or would you suggest some other resources to learn Android development from scratch
Namaste & Regards
Loves from India❤️
@@rameshramesh-bd2wu You can find an ebook online on Java or Kotlin, I recommend you to start learning Kotlin.
Sir u made it so simple and so easy ... Thanks Alot 😍
Q: I don't want back button. So, should i remove connections in nav_graph.xml file?
Nice video 😃
Great series! Very helpful to see how all the pieces go together. Thank you!
Welcome. (from Stevdza-San)
Thanks for the video
How can I change the activity_main (xml) from ConstraintLayout to Drawer Layout once I have already changed it for another layoutpurpose (for instance I might have used it as Linear Layout or RecyclerView)?Please tell me the technique how to solve it?... We do take home page (mainactivity)for everything but it is stuffed with other issues… While I use fragments, they crushed when Irun it… I need help guys please help me. I am a new developer with zeroeducation and experience but I understand how to make apps
thank youuuuuuu
Short and useful! Thank you!
Thanks for supporting . (from Stevdza-San)
Thanks for the video. Little help is needed, after the drawer icon is opened, again clicking drawer icon doesn't close the drawer. how to implement it?
Thanks a lot! Keep the good work! I prefer Java, but I understand why you are using Kotlin and as you already mentioned, we can convert kotlin to java. I just subscribed :)
Lol how
Nice tutoriall
thank you . (from Stevdza-San)
So this way, if we had fragments A B C D, we'd have to create toB, toC and toD actions for A then? And then toA, toC and toD actions for B? That cannot be correct.
I totally agree with you. It feels a bit clumsy. I'm building an app with 9 items in the drawer and users should be able to navigate from any item to any other one so that means about 72 actions already. Am I doing something wrong?
hello guy, i love your channel :)
Thanx a lot.
thankyou !!!!
Great work sir. Keep it up.
Yeh sure. (from Stevdza-San)
I like your videos! They all have good content, but I am a java developer and Kotlin makes it more dificult to understand.
You can copy and paste Kotlin code in Java class and Android Studio will automatically convert it for you.
@@StevdzaSan Thanks !
if drawer is open, and back button pressed,then without closing drawer its directly quit, how to solve this?? or how to lock drawer layout in some fragments?? pls
Thank you very much.
Your welcome . (from Stevdza-San)
Hey man , great content , I have a small problem the navigation drawer doesn't close when I click the hamburger button again and there no any animation
Please, use stack overflow and also recheck or match your complete code with the video
Best vedio sir
Great tutorial, but after drawer icon is opened, again clicking drawer icon doesn't close the drawer. and back icon is not shown in drawer icon place, after clicking drawer icon. Seeking for help! ( using kotlin )
found the solution?
how to disable item when it's selected i couldn't find any reference in docs
please help
Use this -
navHostFragment = supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment
navController = navHostFragment.navController
It’s saying unresolved reference : navigationView
No access to onSupportNavigateUp() from fragment, can you help me with it ?
Just out of curiosity, is it standard practice to make the NavDrawer act as a switch between fragments such that the hamburger icon shows regardless of the current fragment? Any help is greatly welcome. Thanks
Yeah that's true.
Sir can i do that by using only one fragment and show the data related to the menu item clicked
Yeah sure you can do that!
please make a video on recycler view
filter
It is now in his channel, check it out
I failed to do that by java I am stack in the beginning any one help
Thanks a lot i have a Q i can't use this method (findNavcontroller) ! exactly like in this line "navController= findNavController(R.id.fragment)" this method doesn't show for me on android studio any help plz
Add dependency for Navigation Component. Or call Navigation.findNavController
Thnks for answering me
I all ready add those dependancy to my project but when i try to call it (initialize my navcontroller )doesn't show also this method setupWithNavController any help plz
@@StevdzaSan thnks the prob was gone ^^
from: developer.android.com/guide/navigation/navigation-getting-started
val navHostFragment =
supportFragmentManager.findFragmentById(R.id.fragment) as NavHostFragment
navController = navHostFragment.navController
It worked for me. Before only crashes.
@@FIsabettini at last I found something that it works, than you so much
Layout gravity is not available
ik im late, but just try typing it fully inside the view and the error will be gone
Everything is different on Java
How can I add animations? Thanks 🥺🥺
watch his previous video
How to impelment using java
Convert it!
Can you please make a tutorial for beginners ?
sure, you can watch his playlist
doesn't work lol
Is anyone here with an experience of more than a year in android development?
Putting source code would be good maybe a github link to this code.
This makes people lazy!
very helpful but you was to fast in this video
Is there a chance to explain them with Java
You can copy Kotlin code and paste it in Java class, Android Studio will automatically convert it for you. It's not a full-proof method, but still works really well.
@@StevdzaSan thank u