How to Create a Navigation Drawer With Jetpack Compose - Android Studio Tutorial

preview_player
Показать описание
A navigation drawer is a slidable side menu you can use to show and reveal information like menu items. In this video you'll learn how to implement that.

⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:

🎓 Become an industry-ready developer in the Mobile Dev Campus:

🎁 Get my FREE 4.5h course "The Best Practice Guide to Android Architecture":

Read our weekly Android blog:

Join this channel to get access to perks:

Get the source code for this video here:

Join my Discord server:

You like my free content? Here you can buy me a coffee:
Рекомендации по теме
Комментарии
Автор

After 5 years working with XML I start to use compose on my projects.
Philip you are helping me a lot.

sergiomendes
Автор

As for those following along with this vid. There's indeed some edge cases of difference between material 2 and material 3. Most notably the DrawerContent is now somewhat inverted with the Scaffold.
15:07
You won't be able to do so, cuz those functions would probably be composable function, and you're calling them directly from an onClickCallback function (which is not a composable function). You can have the current screen id as a state, and hoist that when statement.

kqvanity
Автор

For all those who are wondering why the reproduction of this tutorial may not work properly, just a note. Compose is developing rapidly. In the Material 2 design, the navigation drawer is part of the scaffold. With the transition to Material 3, the navigation drawer has become an independent composable and can be implemented with NavController.

harthholtz
Автор

Hey Philip, love how you briefly talked about accessibility in this tutorial. One thing we can do with the DrawBody composable to make it more accessible would be to add a `.semantics(mergeDescendants = true) { contentDescription = item.contentDescription }` to the LazyColumn Composable’s modifier. This creates a semantic tree node where the icon and text are merged to make one node. It helps people with screen readers so they don’t need to select the icon and then the menu item label independently.

nevardreik
Автор

Bro really are you reading our minds, looking to implement this and you come with a Video

myfavourites
Автор

Well you just fully answered today's job for me. Thanks Philipp

SiTheMon
Автор

Thank you so much for these lessons!! I learnt a lot from all your videos. Can you please upload tutorials for Material3 design?? A lot of things are different. For example, navigation bar. They also removed rememberScaffoldState..which is confusing me even more :(

sudhanshudubey
Автор

Thank you very much, I still feel new in android when Jetpack came out. Need change thinking instead Designer usage "drag and drop" :)

programuoki-lt
Автор

Thanks for this! You need to be on the latest version of compose 1.2.0 or higher for this to work correctly. Set compileSDK version to 32 or higher

codelabspro
Автор

just used this in a current project :) tyvm

jellybeast
Автор

Hello. How I can get android studio theme like yours? Thank you!

vuduc
Автор

Thank you very much for all your tutorials. It would be nice if you go a little further with explaing how to change the compose and show different composables their viewmodels when switching from Home screen to settings or another page. Thank you.

kitarolivier
Автор

Lovely video than you .
Could you kindly advise the learning path you took to brilliantly know kotlin and Android studio in the manner that you do

mohdotnet
Автор

hello Philipp,
Thx again for all the tutos explanation that is really nice of you.
I have one issue i show a list of games in my app i tried to implement the nav drawer and it worked the only issue is its behind the search bar and the list of games...
If anyone or even you got an idea why i would rly appreciate :).

hisokadu
Автор

Hello, what version of Android do you use?

danielaalvarezs
Автор

i may not be able to follow the guide but at least bro is nice to look at

nickgamespt
Автор

Hi Phillip, can you do a video on Canvas applied to cool shapes such as top bars / nav bars with wavy lines, or something eye catching... Thanks a lot man. Your content is awesome!!!
BTW, can you update this video for M3? Danke schön!!

javimardeveloper
Автор

What is the setup and theme of your android studio? Care to give info?

vanshchaudhary
Автор

HI PHILIPP :How to make the icons in the status bar black and the status bar white, please help me

ahmedassas
Автор

How do you make the drawer not overlap the top bar when open?

kubrix