Navigation Mistake In Jetpack Compose
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
Can you explain proper way to use type-safe navs under Nested Navigation?
Useful tip.
Glad it was helpful!
@@daniel.atitienei Same can be used while navigating to other screen also.
It is nice to see the solution, but I would also have liked to hear more about what exactly lines 105 and on mean :)
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.
in this case, why you won’t use navigateUp() instead of popBackStack() for Back button?
simple solution, isn’t it ?
Then you won't be watching this video if he did that! Lol
Didn't know about that 😅
@@raja_uma1r fact 💯
How does it differ from launchSingleTop in navigation from screen 1 to screen 2 if we press screen 1 button multiple times?
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.
I'm pretty sure navigation has something called popUpTo and popUpToInclusive that resolves the matter no ?
No because that is used when you navigate to a next screen to remove the previous one from back stack.
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
Done! Check it out
czcams.com/video/3g5OzpsJotY/video.html
@@daniel.atitienei 😍