Navigation Component with Jetpack Compose

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • The BEST android courses in the world: codingwithmitc...
    In this video I show you how to use Navigation Component with Jetpack Compose. It is very simple to use Navigation Component with Jetpack Compose. In fact, it's exactly the same. I recommend a single activity architecture with a fragment for each screen in your app. Each fragment should have it's own viewmodel. That kind of an architecture is perfect for Jetpack Compose and navigation component.
    Code: github.com/mit...
    Follow me:
    Instagram: / codingwithmitch
    Twitter: / mitch_tabian
    .
    .

КОМЕНТАРІ • 126

  • @AkshatKumawat
    @AkshatKumawat 3 роки тому +9

    Hey ENGAGEMENT this is your MITCH 😂

  • @naveen1251
    @naveen1251 3 роки тому +7

    Mitch, Nice One again..
    If I am dveloping an app from scratch then Is it a good practice to NOT to use fragment and do everything with compose UI?

  • @feryadialoi2244
    @feryadialoi2244 3 роки тому +6

    can't wait for your complete videos of this jetpact compose with navigation component

  • @saqibmuhammad7218
    @saqibmuhammad7218 3 роки тому +10

    Mitch I think Android team thinking about combine kotlin and flutter ------> Klutter. That's Jetpak very difficult to understand.

  • @MsMagicsproductions
    @MsMagicsproductions 3 роки тому +7

    bro you're a legend!

  • @BlackIronMess
    @BlackIronMess 3 роки тому +4

    I'll leave a like in every single one of this videos, this course is pure GOLD!!

  • @taar1
    @taar1 3 роки тому +4

    Love the improved video quality

  • @ImissYou-p5c
    @ImissYou-p5c 3 роки тому +2

    Nice video

  • @r4856
    @r4856 3 роки тому

    السلام عليكم هل يمكنك ان تساعدني لدي تطبيق نصوص قمت بانشاءه على منصة اندرويد استديو واستخدمت فيه (لست فيو) واضفت ملفات(html ) في فولدر ( الاست ) كيف يمكنني من اضافة خاصية استكمال القراءة من حيث وصل القارئ عند الخروج من التتطبيق والعودة اليه مرة اخرى .... علما ان التطبيق غير ربحي ... ولك كل الشكر والتقدير ...

  • @nitish.anand99
    @nitish.anand99 3 роки тому +1

    You seem like a sweet guy Mitch. If someone were to be ENGAGED with you, they will be very lucky.

  • @HumanBeingSpawn
    @HumanBeingSpawn Місяць тому

    findNavController: Error No value passed for parameter 'viewId'
    Not sure if API change or you lied in your video. 🙃

  • @humbledroid
    @humbledroid 3 роки тому +3

    Just a suggestion, I am sure, you are aware of it, instead of using TextUnit.Companion.Sp() , we can directly use 21.sp, 42.sp as we are using the same for dp

  • @nurhadi-dev
    @nurhadi-dev 3 роки тому +1

    hi Mitch, last week I just learned about swiftui,, I think jetpack compose is looks similar to swiftui, isn't it? btw this is great video. thanks.

  • @cezaryrydzyk3753
    @cezaryrydzyk3753 3 роки тому +2

    What about Jetpack Compose navigation (developer.android.com/jetpack/compose/navigation )? Isn't compose built to make the whole app in kotlin without XML? Does standard Navigation from a jetpack make it harder to make an app with Top and Bottom AppBar or NavDrawer? Now when You have separated views/fragments You have to add Top/Bottom AppBar to every main Compose in fragment. Or you can use it from standard navigation but I think it is not the best to mix Compose with View system. Also making many empty fragments that contain only `return ComposeView` looks a little weird to me.

    • @codingwithmitch
      @codingwithmitch  3 роки тому +1

      Watch this ua-cam.com/video/Gi-MnWDRcmQ/v-deo.html

    • @CommanderSteps
      @CommanderSteps 3 роки тому

      @@codingwithmitch That does not explain how to use it. I hoped for a video showing it off and explaining how to achieve the back button in the TopAppBar based on navigation state.

    • @cezaryrydzyk3753
      @cezaryrydzyk3753 3 роки тому +1

      @@CommanderSteps If You want to have a back button/hamburger button in TopAppBar based on the app's current place in the Navigation graph You can look at my question and answer in SO. Probably not the best solution but it was the only way I found, maybe it helps You stackoverflow.com/questions/65079798/scaffold-with-topappbar-integration-with-navigation

  • @nostranostra1176
    @nostranostra1176 3 роки тому +2

    Clicked the like button before watching

  • @michaeli5113
    @michaeli5113 2 роки тому

    before watching this in 2022 i thought google messed up navigation in compose. maybe composables arent made for screens but only actual UI components.

  • @truepicksyt3323
    @truepicksyt3323 3 роки тому +1

    Closed Blender, Now opening Android Studio

  • @armandoavila4615
    @armandoavila4615 3 роки тому +1

    Engagement 4 months late, but still engagement. I think there is room for an update on this subject, I believe Fragments are not going to be used anymore only composables 👀. Thank you, Mitch!

    • @schwrz1
      @schwrz1 3 роки тому +2

      Probably for new projects but if you have an existing app, interoperability is huge

  • @pratiksaluja2049
    @pratiksaluja2049 7 місяців тому

    Thank you so much CodingWithMitch. This tutorial helped me a lot more than Google doc.

  • @tanjimahmed213
    @tanjimahmed213 3 роки тому

    why you are using XML for containing fragments. what's the point of jetpack compose if we have to use XML?

  • @malcolmdane8819
    @malcolmdane8819 3 роки тому

    How is this simpler than regular fragments etc? I'm sick of android development being such a mess.

  • @azulamazigh2789
    @azulamazigh2789 3 роки тому +1

    is there a solution that does not involve XML. like flutter.

  • @nurmuhammad2042
    @nurmuhammad2042 3 роки тому +1

    Bro you prefect what I saw

  • @chaitanyagopinadh6764
    @chaitanyagopinadh6764 3 роки тому

    Hi
    How to give our own drawable instead of default icons in Jetpack compose(Icons.default.home),
    Can you please help on this,
    Please find below code for your reference
    sealed class BottomNavigationScreens(val route: String, val resourceId: String, val icon: ImageVector) {
    object Frankendroid : BottomNavigationScreens("Home", "Home",
    Icons.Default.Home)
    object Pumpkin : BottomNavigationScreens("Records", "Records",
    Icons.Default.AccountBox)
    // object Ghost : BottomNavigationScreens("Ghost", "ghost_screen_route", Icons.Filled.Home)
    object ScaryBag : BottomNavigationScreens("ScaryBag", "Accounts", Icons.Filled.Home)
    }

  • @emir_avdic
    @emir_avdic Рік тому

    Hey Mitch, you are the King.
    Greetings from Bosnia...

  • @kratom82
    @kratom82 3 роки тому

    i quite dont understand why you put up graphs instead of using startdestination.. if i have to use xml again in my app compose makes no sense at all imho

  • @MuhammadSalman-me5ks
    @MuhammadSalman-me5ks 3 роки тому +1

    engangement thing

  • @cristianovecchi
    @cristianovecchi 3 роки тому +1

    Thank you Mitch, is a very clear explanation!

  • @etelot
    @etelot 3 роки тому

    How about this, implementation 'androidx.navigation:navigation-compose:2.4.0-alpha04'? I try to use that, but I get an internal error. A bad one.

  • @videoguy640
    @videoguy640 3 роки тому +1

    Are you gonna do a video on the navigation compose api?

  • @vibinu7589
    @vibinu7589 3 роки тому +1

    Big fan bro🤩

  • @sinedgars
    @sinedgars 3 роки тому

    Engagement for algorithm. Learning to get a job to buy your course.
    TIP:
    PS, on your website, if you saw a video, it show green checkmark. When you re-watch some part of vid., GREEN CHECMARK IS LOST, would be nice if checkmark would stay either way. Thumbs up !!!

  • @riyasaxena8049
    @riyasaxena8049 3 роки тому

    Building a new engagement process..

  • @ChetanTemkar
    @ChetanTemkar 3 роки тому +1

    This is really engaging, and I like how you keep it so simple as it get complicated!

  • @lukugeraud
    @lukugeraud 3 роки тому +1

    is it only me or I need to declare my fragments abstract or I get an error

  • @bryankiani8902
    @bryankiani8902 Рік тому

    - Mitch ENGAGEMENT!
    - ENGAGEMENT Mitch!🤝🤝

  • @محسننادرزاده
    @محسننادرزاده 2 роки тому

    THIS VIDEO WAS REALLY ENGAGING MITCH

  • @ViralJoshiVirus
    @ViralJoshiVirus 3 роки тому

    Mitch, I found a new way to pass data between fragments if I am not wrong or I would say I found a new ways of roaming between fragments using Single Activity Architecture....

  • @electricalprogrammer456
    @electricalprogrammer456 2 роки тому

    🐐🐐🐐🐐

  • @danyelsh874
    @danyelsh874 2 роки тому

    WOW perfect -> thanks mitch

  • @mehdiparsaei1867
    @mehdiparsaei1867 3 роки тому

    You are Android teacher, English teacher, Actor, Director, Composer, Artist, ...

  • @nilanjanmukhopadhyay8369
    @nilanjanmukhopadhyay8369 3 роки тому

    Hey Mitch this is your engagement

  • @alishanvaliani9952
    @alishanvaliani9952 2 роки тому

    I am enjoying your videos))

  • @vinayreddy127
    @vinayreddy127 2 роки тому

    ThANks for giving it for free

  • @ShethMilan
    @ShethMilan Рік тому

    Mitch good work I really love you man for making our android developer's life.

  • @hirendesai8261
    @hirendesai8261 3 роки тому

    is there any bug in android studio canary 4.2? cause whenever i make changes in jetpack compose app i need to uninstall the app and then have to install it again in order to see changes. I'm not able to see changes after running app or instant run feature.

  • @DS-bz4mz
    @DS-bz4mz Рік тому

    Loving the course :D

  • @alishanvaliani9952
    @alishanvaliani9952 2 роки тому

    I have to finish Jetpack Compose for 2 days, and your videos help a lot)))

  • @thwethmuenyein4605
    @thwethmuenyein4605 Рік тому

    I love the way you explain.

  • @easybusinessou
    @easybusinessou 3 роки тому

    thank you

  • @shalinikhosla971
    @shalinikhosla971 3 роки тому

    Heyy Mitch, ENGAGEMENT

  • @GeorgeMachibya
    @GeorgeMachibya 3 роки тому

    I followed you back when I was doing Pluralsight and I heard to follow you since then and never regret

  • @advitiayanand5974
    @advitiayanand5974 2 роки тому

    Enjoying this alot!

  • @NiteshSingh-bv9lu
    @NiteshSingh-bv9lu 3 роки тому

    Clear understanding

  • @aydogdyaydogdiev1255
    @aydogdyaydogdiev1255 2 роки тому

    here is your engagement

  • @SriHarshaChilakapati
    @SriHarshaChilakapati 3 роки тому

    I prefer to give the IDs to actions as to{destinationFragmentName} with example being toRecipeFragment. This allows us to write RecipeListFragmentDirections.toRecipeFragment() if safe-args is enabled.

    • @codingwithmitch
      @codingwithmitch  3 роки тому

      safeArgs made my daemon process break somehow so I don't use it

  • @amirhoseinheydari4312
    @amirhoseinheydari4312 2 роки тому

    Thank you Mitch

  • @sasanebrahimi1593
    @sasanebrahimi1593 2 роки тому

    IT WAS ENGAGING MAN :))))

  • @RASTstudio
    @RASTstudio 2 роки тому

    This is really engaging, and I like how you keep it so simple as it get complicated! 👌👌👌

  • @raghavendpai
    @raghavendpai 3 роки тому

    HEY MITCH THANKS

  • @kitarolivier
    @kitarolivier 3 роки тому

    Thank you for this nice tutorial. Even you speak fluently, it's understandable for non native english audience. Registered on your site and cliekd like on all video i'm watching.

  • @samha1513
    @samha1513 3 роки тому

    Past couple days I watched some SwiftUI tuts and I think even with Jetpack Compose the Android Development is still hard compare to iOS. thoughts ? I am thinking to switch to iOS but Not sure if I will have a job opportunity with knowing the SwifUI only.

    • @codingwithmitch
      @codingwithmitch  3 роки тому

      I think android is getting easier and easier. Soon it looks like we can get rid of viewmodels even. I'll talk more about that in my new course with kmm.
      Ya I agree with only swiftui knowledge I'm guessing it would be tough to get a job. Just like if you only had compose knowledge it would be difficult to get a job.

  • @AmmarFaris
    @AmmarFaris 3 роки тому

    For those experiencing crashing of app when using latest tools and dependencies, you may want to add this (compose-theme-adapter) in dependencies:
    implementation "com.google.android.material:compose-theme-adapter:$compose_version"

  • @nishantabhishek8199
    @nishantabhishek8199 3 роки тому

    engaging video

  • @hassanharera
    @hassanharera 3 роки тому

    thanks mitch

  • @denihilhamsyah
    @denihilhamsyah Рік тому

    Awesome!

  • @_maverick.
    @_maverick. 2 роки тому

    Great!

  • @vanosuperhero
    @vanosuperhero 2 роки тому

    Thanks!

  • @12Playmobil
    @12Playmobil 3 роки тому

    Why on earth would anybody dislike any of these videos?

  • @VIKASROYv
    @VIKASROYv 3 роки тому

    Video is kind of unrelatable in playlist or i guess video number 4 is missing from playlist. It directly jump from compose thing to xml

    • @codingwithmitch
      @codingwithmitch  3 роки тому

      Oh shit you're right video 4 is missing from playlist. I will fix tomo

  • @garenolorenzo5851
    @garenolorenzo5851 3 роки тому

    But what is the diferent between Navigation Fragment and NavHost?

  • @alirezafaraji
    @alirezafaraji 3 роки тому

    I'm all out! just the video was great. as always :))

  • @piyushpradhan9955
    @piyushpradhan9955 3 роки тому

    Hey Mitch, here's your composable engagement, great tutorial though.

  • @skr4tchnen335
    @skr4tchnen335 3 роки тому

    mich whenever i create a fragment this error always pop Class 'RecipeFragment' is not abstract and does not implement abstract base class member

  • @leonardosibela
    @leonardosibela 3 роки тому

    This video is so NOT UNengaging :p

  • @rexitspersonal8353
    @rexitspersonal8353 2 роки тому

    i really like your teaching style bro , its really engaging

  • @jonneymendoza
    @jonneymendoza 3 роки тому

    Hiya, how do you pass arguments to the other fragment via the example navigation? Thanks

    • @codingwithmitch
      @codingwithmitch  3 роки тому +1

      Use a bundle. The .navigate function accepts a second argument as bundle

  • @ravitejasunkara9477
    @ravitejasunkara9477 3 роки тому

    I m using navigation component in my project. It is basically a one activity (launcher) and many fragments to navigate in it. But I have to use bottom navigation activity also in this project. So if I use another activity in between how can we traverse or is there any solution?

    • @codingwithmitch
      @codingwithmitch  3 роки тому

      Use bottom navigation in a fragment or hide/show it in the activity depending on what fragments you are visiting

  • @WNS.Studio
    @WNS.Studio 2 роки тому

    Thank you for creating real value for me!

  • @mehdiparsaei1867
    @mehdiparsaei1867 3 роки тому

    The best video quality. Good luck

  • @mehulbisht9708
    @mehulbisht9708 3 роки тому

    Being in beta it still has many bugs is what i came to know so far, heating issues and resource management making the computer slow. Mitch, when can we expect a stable version outside canary build, any idea?

    • @codingwithmitch
      @codingwithmitch  3 роки тому +1

      No idea. Seems to work great for me other than the @Preview feature.

  • @harthholtz6462
    @harthholtz6462 3 роки тому

    You have engaged my interest... 🙂

  • @mal7othify
    @mal7othify 3 роки тому

    We needed this tutorial.THANKS!

  • @PraveenKumar-qt8pl
    @PraveenKumar-qt8pl 3 роки тому

    Awesome tutorial Mitch!

  • @mehdiparsaei1867
    @mehdiparsaei1867 3 роки тому

    So, we are forced to have at least one xml layout file for hosting navigation graph?

  • @kishorramani007
    @kishorramani007 3 роки тому

    🙌

  • @khaxbiker
    @khaxbiker 3 роки тому

    Great video as usual. thanks a lot!

  • @wongvoonngee3307
    @wongvoonngee3307 3 роки тому

    🙂

  • @shashankdaima
    @shashankdaima 3 роки тому

    Loved your tutorials.

  • @gouravkolhatkar3623
    @gouravkolhatkar3623 3 роки тому

    So the XML still lives.

  • @wardengrant6070
    @wardengrant6070 2 роки тому

    Awesome vid man. Simple and clean

  • @funnymoment9164
    @funnymoment9164 3 роки тому

    Thanks. Engagement!

  • @eiphyuphwe9269
    @eiphyuphwe9269 3 роки тому

    Awesome Mitch!

  • @appsdeveloper4024
    @appsdeveloper4024 3 роки тому

    Nice Video.

  • @viktorleskov7591
    @viktorleskov7591 3 роки тому +2

    Which one is more sexy for you: Flutter or Jetpack compose?)

  • @hellespont5072
    @hellespont5072 3 роки тому

    Leveling up in Compose is fun 😊

  • @felipefranco7444
    @felipefranco7444 3 роки тому

    Engagement!!

  • @nomanzafarzafar7912
    @nomanzafarzafar7912 3 роки тому

    Great effort bro. Keep it up.

  • @johnybaby9574
    @johnybaby9574 3 роки тому

    nice~

  • @abolfazlrezaei5397
    @abolfazlrezaei5397 3 роки тому

    I LOVE YOU SO MUCH MITCH... JUST I CAN SAY "I LOVE YOU"...