Navigation Mistake In Jetpack Compose

Sdílet
Vložit
  • čas přidán 5. 05. 2024
  • In this video, you'll learn about how to not make an often encountered navigation mistake in Jetpack Compose
    Let's connect 🤗:
    / daniel-atitienei
    Blog: / daniel.atitienei
    Do you like my content? Here you can buy me a coffee ☕:
    www.buymeacoffee.com/danielat...
  • Jak na to + styl

Komentáře • 22

  • @neerajverma9226
    @neerajverma9226 Před 24 dny

    Can you explain proper way to use type-safe navs under Nested Navigation?

  • @vengateshm2122
    @vengateshm2122 Před měsícem +1

    Useful tip.

  • @SunAndMoon-zc9vd
    @SunAndMoon-zc9vd Před měsícem

    It is nice to see the solution, but I would also have liked to hear more about what exactly lines 105 and on mean :)

    • @daniel.atitienei
      @daniel.atitienei  Před měsícem

      When you press on the back button the app lifecycle changes. That line checks if the app lifecycle is RESUMED. RESUMED means that the app is now focused and the user can interact with the app.

  • @muhammadhassaan1990
    @muhammadhassaan1990 Před měsícem +3

    in this case, why you won’t use navigateUp() instead of popBackStack() for Back button?

  • @vijaya5171
    @vijaya5171 Před měsícem +1

    How does it differ from launchSingleTop in navigation from screen 1 to screen 2 if we press screen 1 button multiple times?

    • @daniel.atitienei
      @daniel.atitienei  Před měsícem

      I think it will open only once the screen 2, but if you navigate back by pressing multiple times it should have the same behaviour.

  • @adagabranca
    @adagabranca Před měsícem

    I'm pretty sure navigation has something called popUpTo and popUpToInclusive that resolves the matter no ?

    • @daniel.atitienei
      @daniel.atitienei  Před měsícem

      No because that is used when you navigate to a next screen to remove the previous one from back stack.

  • @sikanderahmad4810
    @sikanderahmad4810 Před 16 dny

    can make a proper video in which fetch api data like fake store api and showing item in lazycoloumn then click on any item that are showing in lazycolumn it navigate to detail screen and showing selected item data and item description of selected item that are coming in response on detail screen by using Type-Safe Navigation and apply shared transition element if possible thanks in advance if you make this video that become very helpfull for all