Комментарии:
As a little addition, in case you also want to migrate your XML theme to Compose:
1. All you really need to do for that is to create the theme-specific Compose files you already get in any new Compose project (Type.kt, Shapes.kt, Colors.kt, Theme.kt). You can just copy these over and adjust based on your theme.
2. Then, in every ComposeView in your project, you use YourAppTheme { ... } as the root wrapper.
That's it.
@Philipp can you help me understand this XML code?
Ответитьcan I convert my whole JAVA android project to jetpack compose..?
ОтветитьIn my firm, we are now migrating our code from XML to Compose. This video is really helpful. Kudos!
ОтветитьGreat to see an insightful tutorial
ОтветитьHi Philipp, thank you for your content. Can you tell, what theme exactly do you use in your android studio?
ОтветитьCan you give us sources to learn Android compose
ОтветитьXML to Compose Migration:
1. 𝙵𝚛𝚊𝚐𝚖𝚎𝚗𝚝𝙵𝚒𝚛𝚜𝚝.𝚡𝚖𝚕's equivalent is 𝙵𝚒𝚛𝚜𝚝𝚂𝚌𝚛𝚎𝚎𝚗.𝚔𝚝
2. Define UI using composable along with state, viewmodel / action, onClick function
3. Set up compose view in fragment, define onclick fns, observe viewModel, pass it to composable
Hey Philipp Please help me or anyone who know the answer;
I have got this error in google internal testing "" Error in java.lang.AbstractMethodError: abstract method "void androidx.test.internal.platform.ThreadChecker.checkNotMainThread() ""
I have search all over the internet but didn't get the solution please help me...🙏🙏
Thank you for this video. The most important information.
ОтветитьCan you make a video about how to handle Lifecycle event in compose? Thanks!
ОтветитьPerfect As Always <3
ОтветитьHi Philipp, why you use lateinit var compose view? you can do like that View = ComposeView(requireContext()).apply { setContent {} } in onCreateView
ОтветитьThanks for the video. I have been working with migrating XML to compose views for some time, and I prefer to pass the findNavContoller() function to the composable. Then I can create a channel that will be consumed by a shared composable.
That means no callback functions to the fragment, it looks more similar to a pure compose screen and just a single line for each screen to allow navigation, toast, pop with arguments, etc.
Also, a simple way to add all compose dependencies is to right-click on the project and tap New -> Compose -> Empty Compose Activity.
hi philipp, thanks for your tutorial videos because it really helps! if i may ask you one thing, please create one video on how to learn programming really fast. a short video is good too. thank you 🙏
ОтветитьThanks 👍
ОтветитьI really don't like this declarative approach of building UI. When flutter came out with this approach I was really exited. But really didn't like it. I tried flutter multiple times but didn't really like it. Same thing is happening with compose. Anyone else can relate?
Ответитьyou are the best👌👌
Ответитьexcellent, as always
ОтветитьI have a silly point but I think it's important, When you have to apply a sound on every button clicked in your app, what should the best approach to this.
Ответитьit's still painful to see UI preview in compose.
ОтветитьExtremely useful! Thank you
ОтветитьHey Philipp, Thank you so much for this great video. But you forgot to add composeView.setViewCompositionStrategy(DisposeOnViewTreeLifecycleDestroyed) inside the fragment which helps composeView to dispose its's composition when the view's lifecycleowner is destroyed.
ОтветитьWhat kind of theme do you have in Android Studio?
P.S. Thank you!
Another Like from me, even though I dont need this, because Im a "guru". 🤣 jk @Philipp, another good content!
Ответитьcould u please make tutorial about baseline profiles?))
ОтветитьThanks Philipp!
Ответить