25 - Nested NAVIGATION - Android Jetpack Compose

Поделиться
HTML-код
  • Опубликовано: 1 ноя 2024

Комментарии • 43

  • @MohsenMashkour
    @MohsenMashkour  Год назад +1

    If you have any requests about the tutorials that you want to see, just leave a comment below! Thanks for watching :)

    • @CodePursuit
      @CodePursuit 5 месяцев назад

      HI, I want to know how to use seperate View models for seperate Graphs , for this function i want to create instance of view model which is only known to composables inside this function but not able to do so because appGraph is a non composable function . fun NavGraphBuilder.appGraph(navController: NavController){
      Question : how to create instance of viewmodel in nested graph of compose navigation

  • @geko1098
    @geko1098 7 месяцев назад +1

    This was much more helpful than the docs

  • @XY_Talks
    @XY_Talks 6 месяцев назад

    Super Thank you, i was searching this video from 2 week, thanks a lot, You are a valuable content creator on RUclips.

  • @bigpiglove
    @bigpiglove Год назад +1

    Thanls you man! Your vidoes are pretty entertatining and informative at the same time! Please continue!

    • @MohsenMashkour
      @MohsenMashkour  Год назад

      Nice to hear that. Please subscribe for more and share the content with your friends.

  • @macbros5681
    @macbros5681 11 месяцев назад

    You explain very clearly what you are doing thanks and keep it up

  • @MauricioSouza-93
    @MauricioSouza-93 5 месяцев назад

    Really nice content and quite simple to understand. Thanks!!

  • @techug2719
    @techug2719 8 месяцев назад

    I love you, I almost died on this one, you're the GOAT,

  • @god_bika
    @god_bika Месяц назад

    I like the way you chose to explane it all. Only essential things but in xml-ed layout navigation view as i remember there was like a tray and were tabs with color shaded on related screen. Your navigation doesnt look similar to that tray . Im looking for that tray with tabs. Because its handy while handling the app by a thumb only. Without reaching out to inconvinient parts of screen. For better user expirience and such things

    • @MohsenMashkour
      @MohsenMashkour  3 дня назад +1

      Thanks for your feedback! I appreciate your focus on user experience. 😊
      In Jetpack Compose, if you’re looking for a navigation style that resembles a tray with tabs at the bottom, you can achieve that using a BottomNavigation component. This allows users to easily navigate through different sections of your app without reaching for the top of the screen, which is especially handy for one-handed use.
      Here’s a simple example of how you can implement a bottom navigation tray with tabs:
      kotlin
      Copy code
      BottomNavigation {
      BottomNavigationItem(
      icon = { Icon(Icons.Filled.Home, contentDescription = "Home") },
      label = { Text("Home") },
      selected = false, // Manage selected state here
      onClick = { /* Navigate to Home */ }
      )
      BottomNavigationItem(
      icon = { Icon(Icons.Filled.Favorite, contentDescription = "Favorites") },
      label = { Text("Favorites") },
      selected = false, // Manage selected state here
      onClick = { /* Navigate to Favorites */ }
      )
      // Add more items as needed
      }
      You can customize the colors and appearance to match your app's theme, ensuring a consistent look and feel. This approach is designed for better accessibility and a more convenient user experience.

  • @planet3a
    @planet3a Год назад

    Thanks a lot. I get every thing now. You sometimes forget to zoom your code editor for us.

  • @insanotu3264
    @insanotu3264 10 месяцев назад

    Çok güzel,çok şey öğrendim.
    Very nice, I learned a lot.

  • @nqmgaming2004
    @nqmgaming2004 5 месяцев назад

    nice, thank you so much

  • @АльфредАхметгалеев

    Thank you for video

  • @MegaTobi999
    @MegaTobi999 Год назад

    It's really helpful

  • @SyncImpl
    @SyncImpl 11 месяцев назад

    That's a good approach. Perhaps do you know how to restore the screen from 1-nested navigation graph, if we navigate in 2-navigation graph and roll back?

    • @MohsenMashkour
      @MohsenMashkour  11 месяцев назад +1

      You can simply call any screen you want and after finishing the process pop the screen out of the backstack.

  • @hemanth_sr
    @hemanth_sr Год назад

    amazing video

  • @ankitkhyalia3194
    @ankitkhyalia3194 9 месяцев назад +1

    How we can share viewmodel instance between different screens in this nested navigation?

    • @MohsenMashkour
      @MohsenMashkour  9 месяцев назад +1

      I will make a video about it very soon

  • @ranjitapadhi4165
    @ranjitapadhi4165 5 месяцев назад

    Why your video quality options was not there in your video ?

  • @AnanthAvinash
    @AnanthAvinash 7 месяцев назад

    can we add fragment and composables inside single navigation graph

    • @MohsenMashkour
      @MohsenMashkour  7 месяцев назад

      Yes you can

    • @AnanthAvinash
      @AnanthAvinash 7 месяцев назад

      @@MohsenMashkour small suggestion or hint how to implement.. please!

  • @manishvipin
    @manishvipin 7 месяцев назад +1

    sir where is the source code of this video, in the link you put the source code of previous video

    • @MohsenMashkour
      @MohsenMashkour  6 месяцев назад

      sorry the link was wrong but now the correct one is in the description.

  • @gloooooom6229
    @gloooooom6229 5 месяцев назад

    how do i do it if i have 2 set of UI screeens for different users ? i have a radio button that lets users choose their user types how can i connect it to the nav?

  • @techkid358
    @techkid358 3 месяца назад

    can u give me a explain why u have create this ?
    sealed class Screens(val route: String){
    object ScreenLoginRoute : Screens(route = "Login")
    object ScreenForgetPassRoute : Screens(route = "ForgetPass")
    object ScreenRegisterRoute : Screens(route = "Register")
    object ScreenHomeRoute : Screens(route = "Home")
    object ScreenBRoute : Screens(route = "B")
    object ScreenARoute : Screens(route = "A")
    object AuthRoute : Screens(route = "Auth")
    object AppRoute : Screens(route = "App")
    }
    what's its purpose or advantage , or use cases ??

    • @MohsenMashkour
      @MohsenMashkour  3 месяца назад

      its like a repository to keep the routes. in order to prevent writing hardcode.

  • @ashishkamat7337
    @ashishkamat7337 8 месяцев назад

    How can we go back to LoginSreen from Either HomeScreen or ScreenA [suppose we want to implement logout]

    • @MohsenMashkour
      @MohsenMashkour  8 месяцев назад

      Use the same code that you used tocome from log in to home

  • @prithvirajdesigner2758
    @prithvirajdesigner2758 6 месяцев назад

    Hello how to hide bottom app bar while navigating inside screens

    • @MohsenMashkour
      @MohsenMashkour  6 месяцев назад

      Use the navigation outside of the Scaffold.

    • @prithvirajdesigner2758
      @prithvirajdesigner2758 6 месяцев назад

      @@MohsenMashkour thank you so much .. I will try it once

  • @insanotu3264
    @insanotu3264 11 месяцев назад

    Mohsen Hocam ben uygulamayı yaptım,sorun görünmüyor ama emulatörde göremiyorum.Emulatörde boş sayfa var.Program hata da vermiyor.Emulatorü kaldırıp yeniden yükledim,programı kapatıp açtım olmadı.Ne yapmam gerekiyor.
    Teacher Mohsen, I made the application, the problem does not appear, but I cannot see it in the emulator. There is a blank page in the emulator. The program does not give any errors. I uninstalled the emulator and reinstalled it, closed and opened the program, but it did not work. What should I do?

    • @MohsenMashkour
      @MohsenMashkour  11 месяцев назад

      Probably you did not call the main screen. Check your graph again and set the first destination.

    • @insanotu3264
      @insanotu3264 10 месяцев назад

      Teşekkürler.Yaptım.
      Thanks. I did it.