Navigation Compose on every screen size
Вставка
- Опубліковано 19 вер 2024
- Writing a single navigation system that can handle phones, ChromeOS devices, and everything in between can appear daunting. We talk through strategies for approaching this work and how Navigation Compose can be used alongside the canonical layouts to build the best experience for large screens that seamlessly adapts down to phone screens.
Resources:
Get started with the Navigation component → goo.gle/3SYr8hv
Navigating with Compose → goo.gle/3ftlvdv
Navigation for responsive UIs → goo.gle/3zImP37
Speaker: Jeremy Woods
Watch more:
Watch all the Android Dev Summit sessions → goo.gle/ADS-All
Watch all the Form Factors track sessions → goo.gle/ADS-Fo...
Subscribe to Android Developers → goo.gle/Androi...
#Featured #AndroidDevSummit #Android
What to say about wearos android apps and navigation? similar navcontroller? how to implement android ui tests?
so, there no silver bullet for all screensizes. at least a talk about it i was missing so far, also shines a bit more light on the navhost
We're not quite able to take down the werewolf that is all screen sizes, but we are making it easier to manage!
Arm yourself to tackle all screen sizes by checking out our codelab: goo.gle/3DLSdyA
What do we deprecate this time??
@@Sherimankind 😂😂
Compose is now deprecated 😂 Please use CSS instead 😂
@@codelabspro hahaha 🤣
Thanks Jeremy!
The NavHost/NavController behavior is that of a Backstack. If I want a different behavior, let's say a card roulette for a TV App or a navigation that allows more than one item Active in the screen at the same time, then it won't fit my needs. I think you guys should make the NavHost/NavController API more open to customizations. My navigation may not be "Backstack" related
Fully agree with it
Sounds like you just need another nav host. You can create a Nav Host per upper/main content. So in other words each screen has their own nav host with it's own nav graph. Hopefully I understood your problem correctly.
Where can I get this code? Especially example with deep link part.
Hi @Android Developers
Android Developers
I am having a problem. Since 2-3 months now im working on my startup which is 2 apps using the same databases I don't know if I might call it like that...its like UBER which have the users(customers app) and users(drivers app) but both communicating with the same database...as a self taught android developer, im a little bit lost about how to connect the apps together...can someone give me a way pls, THANKS guys.
Sounds like you just need a backend application. Like Firebase's Functions or a Spring Boot backend, or a Rails backend. Basically, the apps already "connect" to each other, since they are using the same DB, they just present data (assuming by same DB you meant a DB running on a remote db server and not the device). To make that more streamlined, a backend would orchestrate the mobile apps state. So driver app, sends detail to backend, backend pushes detail to customer app, and vice versa. Thus, only the backend R/W to the DB.
@@theren8311 i am using Colton as programming language instead of java...but as database I used Room database instead firebase or SQL as other developers...
@@LaughTale1993 Colton or Kotlin?
Thanks, very informative.
All that shenenigan to go from one screen to another ):
use a when statement.
I know I have to dig further but just leaving a naive question, what's the difference between movableContent() vs rememberUpdatedState() ?
they are very different things, movableContentOf lets you "move" the same-looking composable hierarchy from A to B based on its ID, while rememberUpdatedState is a way to ensure that effects receive the latest incoming argument values even if the keys don't invalidate and recreate the effect.
@@Zhuinden thank you.
I had a feeling that Navigation Compose would get deprecated
I bet it will be either deprecated or the API will change a lot within the next year.
Yeah, feels like too many ad-hoc solutions are being introduced.
navigation in jetpack compose is such a pain
"Muvu content"
📱🇨🇴🙋🏻♂️👍🏼🤝🏼