Holy fuck its a 16 step process to go to the next screen and say hello phillip
@LuckyFortunes-b3q2 ай бұрын
looks too damn complicated. Every other language including apple it's a few lines of code.
@Blackops1990 Жыл бұрын
Thx works. If the app is crashing for anyone make sure you revert @15:20
@zaryabK-vi8fh2 жыл бұрын
the old nav graph stuff was so easy
@thearpansircar3 жыл бұрын
Loved this explanation, Philipp! Absolutely easy to understand and implement. Tried it out on a project that I've been working on and it implemented beautifully without a single error. Thanks :)
@dransom90 Жыл бұрын
Finally, a well-explained tutorial!
@atila_tv2 жыл бұрын
Damm, doing this makes me miss the old Intents.StartActivity, don't you think is too much for just changing from one screen to another?
@Pritam2525 ай бұрын
Agreed, but i do wonder if there are any benefits for this much more complicated method, or maybe it's more flexible.
@edawge5 ай бұрын
This video helped me set up what i've been trying to do for weeks. I also didn't need the dependency in the build.gradle file. Thank you for this!
@farahrayis59283 жыл бұрын
Such a great tutorial, you made compose navigation super easy to understand. Thank you so much. You are an amazing teacher.
@denisshov8518 Жыл бұрын
Thanks for the dependency in the description so I can just copy-paste. Love your tutorials. Super quality.
@aamirhoda73636 ай бұрын
17:45 you have mentioned you don't realize why that TextField & button stick to the top instead of the center of the screen & the answer to that is that you mistakenly used fillMaxWidth() instead of fillMaxSize() in the Column modifier. 😄😄😄😄 A very simple thing, learnt it from you only. Thank you!
Жыл бұрын
Hello Philipp ! Thank you for your tutorial. Just watched it after your Jetpack Compose beginner crash course. Very well explained !!
@vindoodles73462 жыл бұрын
really wish i could see the whole screen when you're working, it helps for newbs who need to see their way around the application. You have a lot of different folders and setups than I do and so panning the camera all over the application leads to a lot of confusion.
@tanjimahmed2133 жыл бұрын
Thanks for your amazing tutorial
@aleksandrnikolaev2914 Жыл бұрын
So, my application crashes without passing an argument. But But if I use ?name={name} instead /{name} then the application crashes when you pass arguments and when you don’t pass it, it successfully substitutes the default value. What could it be?
@aidansharp50539 ай бұрын
I am having the same issue
@stefanusayudha18532 жыл бұрын
why wont they make it simpler
@alvaroisea22593 жыл бұрын
thanks a lot for your tutorials, definitely among the best teaching android out there
@МихаилСеливерстов-э7у2 жыл бұрын
Man you are the best! Thx for tutorial. For a newbie like me it like a wellspring!
@RagHelen10 ай бұрын
Does the classical way without Jackpack require a similar convoluted mess?
@mrhacker54763 жыл бұрын
So we should use compose able functions as different screens instead of whole fragment?
@PhilippLackner3 жыл бұрын
yes
@dharmeshbasapati44972 жыл бұрын
@@PhilippLackner If we use composables as diff screens then how to manage their lifecycle of each screen(in our case, composables) ?
@Navak_8 ай бұрын
Ok ok this is great for navigation WITHIN Compose but how do you pass navigation commands from OUTSIDE Compose? The NavHost obeys the NavController but the NavController exists entirely within Compose. I need an external ViewModel to be able to command the NavController.
@Lord0lives3 ай бұрын
I'm not sure what the feature is called, if it's part of Android Studio or if it's part of plugin, but can someone tell me how the editor is showing the scope variables (e.g. this: ColumnScope, it: String, etc)? Thanks.
@h.k3260 Жыл бұрын
How come theres nothing in the Main activity file?
@UriahHeep-gj5jj Жыл бұрын
Very good tutorial. It is easy to follow and understand; however it is easy only if the user is starting from scratch. I am trying to impliment this tutotrial with the other one you have about the Room database. I have not been able to incorporate both. The 2 tutorials don't seem to be compatible. Perhaps it would help us all if you could make another tutorial where you incorporate bot tutorials. Thank you and keep up the good work.
@redleon802 жыл бұрын
I like your videos man, all of them are very useful..
@richardwilkinson78733 жыл бұрын
As always a great video. How do we use the NavButton on any other screen but the MainScreen?? Which navController do we need to import??
@ChrisAthanas3 жыл бұрын
Im looking in you repo for the source code for this video, and Im not finding it... is it there in a different name?
@sebastiansopala62953 жыл бұрын
very nicely and clearly explained, great job, thanks !!
@jordi5921Ай бұрын
for those wondering, yes this still works. make sure you're using compile SDK 35 for your emulator
@daniyar27183 жыл бұрын
Thanks for a video. Very good explanation.👍😊 Very surprised how navigation works, no need to create fragments, mind blowing 🤯
@rezazavareh4899 Жыл бұрын
Hi Philipp, I implemented it but have a problem with recomposition after getting data from the view model and navigating to the next screen and not find right solution
@dmytromarchuk30233 жыл бұрын
What is happening with the screen A when we open screen B? A->B We used to think that it will be stored somehow and will be restored once we press back. But since Compose is function of a state, it will free up all the resources of the screen A and will be composed again when we go back. Is that correct?
@LethalFellowship2 ай бұрын
exactly. the lifetimes of those "remember" things are not obvious at all
@utarasama Жыл бұрын
Thanks! you helped me a lot
@Albert-Dyck9 ай бұрын
3:55 sealed class missing in Android studio Iguana. What now?
@chisatonishikigi91648 ай бұрын
make normal kotlin file and type in sealed class
@cinnybun7393 жыл бұрын
This was awesome!
@Kunal-jp8tn3 жыл бұрын
Thank you so much for this simple explanation....
@khronosium84803 жыл бұрын
Hello! Thanks in Advance for this. It helps a lot. So Is it safe to say the whole Activity/Fragment as Pages Paradigm can be replaced with this? One Activity is enough to make an app. Say an app contains Auth, Dashboard, Profile, Transactions, etc. ?
@PhilippLackner3 жыл бұрын
Yes correct, one activity is enough
@khronosium84803 жыл бұрын
@@PhilippLackner I see, much obliged!
@meigarajuma2 жыл бұрын
How if the string argument that we want to pass contains slash "/"? Is it read as an argument separator?
@David-zb8br Жыл бұрын
hey philipp, is it possible to share viewmodels between screens using compose navigation? or just primitive types are allowed?
@mindfulnessrock Жыл бұрын
What's the second "build.gradle JetpackNavigation" file is all about?
@mehulbisht97083 жыл бұрын
*Offtopic fun fact: earlier Philipp was able to hide her behind his chair when recording in front of his bed but now the green screen made him no longer used to it, so now he has to tilt his camera to hide her 😂😂
@umaralfaruq13042 жыл бұрын
How to add transition like opening and closing activity?
@mayanknagwanshi Жыл бұрын
so the app is now a single activity?
@ajay-ri7ex2 жыл бұрын
What is the best way to pass bitmap between composoble screens
@st48493 жыл бұрын
How can I deeplink into a specific screen in this single-activity scenario please? Can the NavHost be instructed to map a deeplink to a route? (I presume the Activity needs to be set up to receive all possible deeplinks in some way for this)
@danielmwinzi92232 жыл бұрын
Is it a bad practice to use intent when navigating to another screen
@Rafael-hk9pg3 жыл бұрын
How about conditional routes when the user authenticates?
@alexissuarezalvarez56222 жыл бұрын
Hi, I am starting with android, and I have a query Is navigation similar to using Intent in android?
@mojtaba_shafaei3 жыл бұрын
Tnx Phillip, for all of your tuts not just this video. Is it possible to add compose to an existing project without refactoring old codes?
@MrNik-zv7dp2 жыл бұрын
JetCompose dropdown . with only icons . no text. do we have that in android ? Icon Drop down ?
@DraskoSaric3 жыл бұрын
Why don't you use graph? It is more visible when you have all drawn on one place.
@mahendranv62643 жыл бұрын
How to use github libraries views which those included in xml file in a jetpack compose...?
@josephtorres70912 жыл бұрын
nice explanation. you can set the varargs type to Any so that it can also accept other data types rather than String types only.
@talhashaikh14353 жыл бұрын
Can we develop the same using NavGraph ? and if so what changes we have to make in gradle file
@xavierrispal96053 жыл бұрын
Hello Philipp and thanks for this interesting video. Have you tackled a little bit the topic of screen transition animation which was pretty easy in navigation components but seems to be much much harder in Compose ?
@harisai35802 жыл бұрын
Philip why you have made the media queries video private. please make it available
@dmytromarchuk30233 жыл бұрын
Is there any way to implement nested navigation? I tried to do this for a single tab by using navigation instead of composable function, when defining NavHost, but when it was buggy. Example: A-B-C - 3 bottom bar tabs I go to B->B1->B2 Then go to A Then go to B I expect to see B2 route, but it is B Passing a different NavController to a nested graph leads to a crash "ViewModelStore should be set before setGraph call"
@fernandomtz817711 ай бұрын
Im getting an error when i make this: NavHost(navController= navController,startdestination = Screens.Mainscr.route){ composable(route = Screens.Mainscr.route){ Mainscr(NavController = navController) } Says i have to create composable function. Can anyone help? I may be missing a gradle implementation but idk.
@gsmtechzambia398510 ай бұрын
Which composable?
@Spham992 жыл бұрын
If anyone an answer this, that would be great! So Jetpack Compose is like navigating between different "screens" (AKA fragments) on one singular Activity? Also anyone else having issues with the 'rememberNavController()'? Im getting IllegalStateException there ...
@joshrose99873 жыл бұрын
Hey Philipp, how do you make it so that when you select a method from the autocomplete dropdown, the method argument keywords appear too?
@neilloncesar52193 жыл бұрын
There is any other solution to pass Parcelables as parameters using Jetpack Compose? The two I end up were to use Json or put parcelable directly on the backStack
@farazahmed72 жыл бұрын
It seems that we wont be needing fragments now. But do the compose pause when it is in background and another compose screen comes in foreground ?
@commonsense10193 жыл бұрын
Hello idk why but I am not able to get the alignment part right
@droidcasts73503 жыл бұрын
nice example, thank you
@tavindersingh81853 жыл бұрын
Hi, Can you tell me how to create a new launcher activity in jetpack compose?
@juanfrancisco90393 жыл бұрын
Philipp, have you tried navigation from a page inside an HorizontalPager?
@DanOfYT5 ай бұрын
I tried running my app with name as an optional argument like you showed, and my app was crashing. Could not figure out for the life of me what was doing it. Then I realized - the helper function was still creating the route with the required argument syntax.
@Hrit2 жыл бұрын
Helpful one, could you make a video on how to navigate between activites?
@skr4tchnen3353 жыл бұрын
hey philip do you have any idea how we can listen to viewmodel livedatas with jts ui state in jetpack compose?
@PhilippLackner3 жыл бұрын
you can convert live data to compose state with the function observerAsState() I think
@koczmen223 жыл бұрын
@@PhilippLackner What about observing one-time events emitted by SharedFlow?
@narendragupta32043 жыл бұрын
Do u have any examples for below scenario Graph_A--->F1,F2,F3. Graph_B--->F4,F5,F6 So I need to lunch F5 from the F2 with passing data .
@mehranj733 жыл бұрын
What about our own objects? How can I pass them?
@ahmadh93812 жыл бұрын
@Philipp Lackner , Hello sir, can you do a video on how to navigate between different screens by inputting voice/speaking using jetpack compose For example the user should talk to the application and if for example the user say "next" the app should move to the next screen and if the user say "back" the application should navigate to the previous screen I can't find this information anywhere on the internet. Thanks sir, Hope you respond to me quickly please
@mariofeles13 жыл бұрын
how to pass parcelable without navigation? @Philipp Lackner
@benarjee97772 жыл бұрын
it is getting complex with compose for passing nav arguments
@kennardsugirotok73742 жыл бұрын
Can you pass a mutable state?
@abhay21923 жыл бұрын
Please sir🙏🙏🙏make a video illustrating the use of architectural pattern in jetpack compose
@PhilippLackner3 жыл бұрын
Did that in my pokedex Playlist
@Someone-q6f5x3 жыл бұрын
No, beg harder
@abhay21923 жыл бұрын
@@PhilippLackner maybe, (didn't want to say that) it was not that explanatory 🥺
@denisk38523 жыл бұрын
Why did Google do navigation with no simple sending of parameters: strings, numbers, objects? It’s boring to send arguments not directly.
@PhilippLackner3 жыл бұрын
I think it is very simple as it is
@halvtysk2 жыл бұрын
Great guide and presentation, but as I'd never heard of "Compose navigation" before, I was really confused about the steps behind the development of this feature. To me, it feels like taking steps backwards from the "Jetback Navigation" way of navigating. The lack of a navgraph (xml) and the fact that you pass arguments almost like a url feels like a huge disadvantage to me? You lose all the type safety and ease of use that you get from using safe-args, and you also have to "re-invent the wheel" with regards to setting up navigation. I don't really see the benefit of using this over "default" jetpack navigation? Unless you (for some reason) really dislike writing xml, I don't see any immediate connection/benefits to this way of merging the worlds behind navigation and compose? Am I missing something?
@PhilippLackner2 жыл бұрын
Nope, you're right, the normal navigation for Compose is pretty bad. That's why I typically use the Compose Nav Destinations library for that which makes this a lot easier
@halvtysk2 жыл бұрын
@@PhilippLackner I found that video a couple of minutes after writing my comment above, so I'll spare my judgement until I've finished that video. :) But: I still can't understand what the benefits are compared to just using "normal" navigation? A library that improves it is great, but if it forces you to use third party library, it feels like you're back to the times before Jetback navigation where every developer had their own self-written or third-party library handling navigation. It might be a personal preference, but I'd prefer *less* fragmentation between apps. As it is now, library or not, I still can't see the benefits to either Compose or navigation in general to using this?
@tristanrentz76872 жыл бұрын
As I engage it, this tutorial is a year old.... I'm experiencing NO END of build issues. Please please please Philipp, thinking back and knowing all that you know, what can you give me to simplify this nightmare so that I can complete the tutorial with my sanity intact and my blood not on my walls? PLEEEEEEASE HELP
@ultimat.3 жыл бұрын
Je voudrais qu'une. Liste d'items ouvre d'autres liste de divers catégories avez vous des tutos ou des liens qui pourrait traité mon sujet , merci
@TheMyth2.93 жыл бұрын
Good tutorial, thank you so much, it is so much better than the old XML. I am very new to Android Dev`. But I have to say, this is still way too complicated & not very inuitive for a high level framework, especially passing arguments should be much simpler
@PhilippLackner3 жыл бұрын
well passing arguments works the same way as on the web now. I think with XML it's actually not less complex to deal with Intents and bundles
@TheMyth2.93 жыл бұрын
@@PhilippLackner Thanks, If I wanted to manage state in ViewModels, would there be one viewModel per screen? How would I add state here?
@crateer2 жыл бұрын
@@TheMyth2.9 well that depends on your architecture. You can have one ViewModel per Screen, or a single one for all Screens. Obviously one ViewModel per Screen is cleaner. I hate to say it, but it’s true as always: it depends 😂 For state just use LiveData as usual, then handle them in your Screens
@ahmadh93812 жыл бұрын
@@PhilippLackner , Hello sir, can you do a video on how to navigate between different screens by inputting voice. For example the user should talk to the application and if for example the user say "next" the app should move to the next screen and if the user say "back" the application should navigate to the previous screen I can't find this information anywhere on the internet. Thanks sir, Hope you respond to me quickly please
@bodormarcel4373 Жыл бұрын
Here is probably the main "pain" in android/kotlin/compose family. Your nice example does not work anymore with an actual version. I was trying to implement it for two hours or so... errors, errors... Gradle info's are no longer available etc... a real mess. I don't blame you. To the contrary, your made an excellent job... but as two of my books : they are obsolete after a very short while.
@Blackops1990 Жыл бұрын
Works for me. In the gradle make sure you have the updated nav implementation, you don't need to do anything in the Project grade. also @15:20 make sure you revert to "/{name}" or the app with crash on button click
@kamildoan3 жыл бұрын
Really nice content. I am wondering why jetpack navigation doesn't have animation when routeing another page
@brianryan40533 жыл бұрын
Intents deprecated ? ?. ?: !!
@shibabasensei62193 жыл бұрын
The project is using an incompatible version (7.0.0-alpha05) of the Android Gradle plugin.
@fauxvillage38113 жыл бұрын
perhaps you can try version 7.1.0-alpha03 (when in alpha, they tend not to continue serving the previous releases, so the ide reports it not being available...), and perhaps also kotlin-gradle-plugin:1.5.10 which seemed to be required for on my androidstudio bumblebee ide
@shibabasensei62193 жыл бұрын
@@fauxvillage3811 classpath 'com.android.tools.build:gradle:7.1.0-alpha03' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10" thanks working
@Alex-ve4wr3 жыл бұрын
Helpful
@PhilippLackner3 жыл бұрын
Glad it helped!
@AbhishekPal-ri9gr3 жыл бұрын
Can you make a video of android development roadmap
@PhilippLackner3 жыл бұрын
no I'm not a friend of roadmaps. Just learn the basics and build projects. You'll learn everything necessary on the fly
@voidpointer3983 жыл бұрын
@@PhilippLackner thank you for specifying the way
@iam-learning63743 жыл бұрын
follow his tutorials, you will rock :)
@peterjcspencer2 жыл бұрын
Great video! But all this to simply navigate between two screens, having to pass string args...
@amirhosseinesmaeili38192 жыл бұрын
Nice
@mrbmro39912 жыл бұрын
Tons of boilerplate just to send an argument from one screen to another? Android developera need to rethink this
@abuiman52513 жыл бұрын
Dear Philipp, I am sorry that my comment not related to this topic, but could you please show how to implement real ERASER TOOL using PotterDuff.Mode in Drawing App, not just setting white color or any other color equal to background color. I've been stuck with this issue for a long time and cannot find any solution in Kotlin. PLEASE help if it is possible. I will be really grateful!
@zohaibraza13653 жыл бұрын
Very Nice Explanation. Although i have a question. I have a Main Screen Composable, inside of which i have defined NavHost and Routes. Now i have Navigation like this : Main Screen -> License Listing Screen -> License Detail Screen But Issue is when i use navigate(":License Detail Screen") from inside of "License Listing Screen", then Listing Screen gets removed from stack. But i want this Listing Screen to stay right there. But currently when navigate to Detail Screen it pops out the Listing screen and It's Exit Animation is displayed. It would be awesome if you ping some comments on this.
@codingwithsam49923 жыл бұрын
Please upload the github repository of this
@Vl-TV2 жыл бұрын
tnx bro
@ZaidZakir3 жыл бұрын
fillMaxSize() to fix the alignment of main screen
@CorneliusJubril Жыл бұрын
fucking hell! just to switch from 1 screen to another. XML was better 😑
@Luffy_2804 Жыл бұрын
fr 😂 they just fucked up jetpack
@shaikhshafeen6 ай бұрын
I always end up here looking for understandable tutorial 😂
@humanscape57203 жыл бұрын
What's the point in the sealed class with the different screens? I can't see why it's important at all!
@humanscape57203 жыл бұрын
Okay so to answer my own question, it basically just seems like it's storing strings for the routes, but doing it in this way allows you to have one source of truth for the different routes!
@michaelchristensen83503 жыл бұрын
About Modifiers. Is it ok to place them in any order after we pass other arguments to our @Composable functions, becuase I thought we should always pass them first. But I see here You often pass them after the other arguments are passed ? Like for example I though we should always do like this ? @Composable fun MyComposable( modifier = Modifier.fillMaxWidth(), value = "Some Text ") But you are often doing it like this. @Composable fun MyComposable( value = "Some Text ", modifier = Modifier.fillMaxWidth()) So does it even matter where we place the modfiers, or are there some good practice we should follow ?
@PhilippLackner3 жыл бұрын
doesnt matter
@harisai35802 жыл бұрын
I think with intents it seems a bit easy
@jiananli9507 Жыл бұрын
Thanks for explaining ❤. I am an iOS developer. It’s still complicated than SwiftUI.😮