Using Jetpack libraries in Compose | Session

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 54

  • @codinginflow
    @codinginflow 3 года назад +8

    Working hard on my Compose course 🥵

  • @idleidle3448
    @idleidle3448 3 года назад +8

    Excellent session and a great overview of what to expect when we finally move to a fully composable world! Thanks Ian and Manuel!

  • @GoDigital685
    @GoDigital685 Год назад +1

    So happy to be here 🥰🥰🥰🥰

  • @aksh1618
    @aksh1618 3 года назад +2

    This is hands down my favorite I/O session this year 🙌🏼🙌🏼

  • @StevdzaSan
    @StevdzaSan 3 года назад +3

    Declarative UI is the future.
    Very informative video, good job guys! 👍

    • @llothar68
      @llothar68 3 года назад

      Only for toy programs. If you have something more complex you don't want it. I can maintain and update my states myself with a little boilerplate code.

    • @mrtruthvirtue8752
      @mrtruthvirtue8752 3 года назад +1

      I'm a fan of your channel @Stevdza-San

    • @StevdzaSan
      @StevdzaSan 3 года назад

      @@mrtruthvirtue8752 💜🙏

  • @Mrdresden
    @Mrdresden 3 года назад +5

    The lifes of Android developers is going to get so much more easier and fun with Jetpack Compose and all that it brings!

  • @samstoyroom
    @samstoyroom 3 года назад +13

    Need compose course in Udacity!

  • @Girrafffe
    @Girrafffe 3 года назад +1

    Great video, compose is awesome!! I Appreciate all your hard work around Navigation Ian. Looking forward to seeing how nested navigation and multi back stack is going to work.

    • @wernerdittmann7579
      @wernerdittmann7579 3 года назад +1

      That's exactly what worries me somewhat. When using nested stuff, etc how to describe it in a way that's understandable and usable? In a project we did the onboarding UI flow with navigation (it's a complex message/phone/contact handling app, not just a simple lookup for plants :-) ) and even this was not straightforward. All other UI flows use 'pure programming' 😉(not Navigation) to cover all the different flows, screens, pop-up etc.

  • @MK-to4et
    @MK-to4et 3 года назад +1

    6:15 I'm glad that you are starting to explain some best practises around state and events (stateless/stateful). Of course you seem to forget that a lot of compose examples have if / elses littered in the composable which are side effects, no an ideal best practise (tell don't ask). Also these principles can be applied well, anywhere (traditional xml layouts with data binding for instance) - its not synonymous with Compose.

  • @kirsh300
    @kirsh300 3 года назад +2

    Jetpack Compose for UI development on Android is great. I've been using it for a while and I enjoy it a lot.
    It is unfortunate however that the Compose navigation library does not support passing complex data as a navigation arguments, such as a custom Parcelable. The non-compose version of navigation components supports it with "safe args" and that feature is simple to use and productive. Not supporting complex data as arguments in compose forces developers to introduce abstractions that they might otherwise not need or even wish to have.

  • @teowenlong9042
    @teowenlong9042 3 года назад +13

    Is there a github repo to this compose project mentioned in the video?

    • @MaggicBones
      @MaggicBones 3 года назад

      Yeah I also want to know.

    • @Soulcybering
      @Soulcybering 3 года назад

      There are a lot of them because it was a sample app called "Bloom" for the Android Compose Dev Challenge. Like this one: github.com/msasikanth/bloom

  • @Nomad7541
    @Nomad7541 3 года назад

    Thanks Ian!
    Your work is very helpful to the Android dev community

  • @GakisStylianos
    @GakisStylianos 3 года назад +7

    Wow this was a lot. Especially the part with the savedstatehandle. You show how it's retrieved to call the repository, but where does it get set in the first place? Is there a sample with this entire app somewhere with the implementation as discussed in this video?

    • @IanLake
      @IanLake 3 года назад +12

      I mentioned this at 16:48 - the SavedStateHandle is *automatically* populated from the arguments on your Navigation Compose composable destination; there's nothing you have to do to get that working. There's no sample specifically for the fictional 'Bloom' app we talked about here, but many of the techniques are used in our existing Compose Samples (e.g., the Owl sample app): github.com/android/compose-samples

    • @GakisStylianos
      @GakisStylianos 3 года назад

      @@IanLake awesome, as I said you did kinda lose me there 😂 So where is that happening exactly? Does hiltNavGraphViewModel() do that? I don't see where else the VM would get the argument.

    • @Zhuinden
      @Zhuinden 3 года назад +3

      @@GakisStylianos Hilt sets up the AbstractSavedStateViewModelFactory correctly with the proper initial arguments

    • @yashovardhandhanania473
      @yashovardhandhanania473 3 года назад

      @@IanLake Wasn't bloom just one of the app designs for the AndroidDev Challenge some time back?

    • @yashovardhandhanania473
      @yashovardhandhanania473 3 года назад

      @@GakisStylianos yeah hiltNavGraphViewModel() is basically setting the savedStateHandle with the parameters from the route when instantiating the viewModel

  • @devprouk9512
    @devprouk9512 3 года назад +4

    The routing definitely needs some type safety. I get the flexibility with using simple string values, but too error prone on referring to a path or trying to discover one. Some type safety would be better.
    E.g. sealed class MyRoutes: Route and referring to routes through the types of this route.
    Hope it will get better .

  • @robelseyoum1583
    @robelseyoum1583 3 года назад

    great demo, thanks

  • @narendratechguy7140
    @narendratechguy7140 3 года назад +5

    nav part seems bit complicated compared to compose

  • @wernerdittmann7579
    @wernerdittmann7579 3 года назад +1

    I would like to use Fragments, Activities etc and pure Compose, but without Hilt, Navigation. IMHO this adds too much overhead and also complex UIs flows are very complicate to create with Navigation. It just adds confusion. These so called navigation paths/trees are IMHO a nightmare when it comes to non-linear UI flows, when the app needs to deviate, or showing screens in case or errors and needs to follow a complete different UI flow.
    Will it be possible to use Fragments and compose without using 'onCreateView(...)' and all its inflate parameters? Maybe a new 'onCreateWithCompose(..)' function or alike? For an Activity it's quite simple to set the compose content. Why not for Fragments as well?

  • @YoutCodeProgrammingTutorials
    @YoutCodeProgrammingTutorials 3 года назад

    can I ask u what tool u are using to make this great presentations !?

  • @RadiLayt7078
    @RadiLayt7078 3 года назад +3

    Concerning the compose navigation, how can we implement the transition animation between screens when navigating?

    • @Zhuinden
      @Zhuinden 3 года назад

      you can't

    • @RadiLayt7078
      @RadiLayt7078 3 года назад

      @@cepelinmaisis Is it implement now? because in previous navigation-compose version, this attributes aren't take into account

    • @Zhuinden
      @Zhuinden 3 года назад +1

      NavGraph XML? In Navigation-Compose? Where??

    • @IanLake
      @IanLake 3 года назад +4

      We actually specifically point this in the guide (see the note at the end of this section: developer.android.com/jetpack/compose/navigation#nav-to-composable) - star the existing feature request for transitions in Navigation Compose for updates: issuetracker.google.com/issues/172112072

  • @cnkaptan
    @cnkaptan 2 года назад

    Thanks for tutorial but where can i find the source code of Bloom?❔

  • @bahaaka828
    @bahaaka828 3 года назад

    Any plans to have compose version of React Context Api

  • @johnjeremih
    @johnjeremih Год назад

    At 13:06 hiltNavGraphViewModel doesn't work anymore now it is hiltViewModel() as version 1.0.0

  • @AIGameMonster
    @AIGameMonster 2 года назад

    I want to embed Unity Game into Compose UI, how can I do it better?

  • @abrarwiryawan
    @abrarwiryawan 3 года назад

    Where is the link to that sample app? is Bloom a commercial app belongs to company so the code is not shared?

    • @Soulcybering
      @Soulcybering 3 года назад +1

      One of the many samples you can find on GitHub: github.com/msasikanth/bloom

    • @abrarwiryawan
      @abrarwiryawan 3 года назад

      @@Soulcybering yes found out it challenges app, but i guess my point still stand. With lot of those samples, which one that considerably best practice and shown in this video. Im curious about the Flow implementation. Anyway, thanks for the link

  • @viniciussantosguimares2994
    @viniciussantosguimares2994 3 года назад +1

    Feels like react router in android

  •  3 года назад

    how do you guarantee the repository is instantiated when using it in the init block of the view model?

    • @OliverRhyme
      @OliverRhyme 3 года назад +1

      It is injected so it is already instantiated

    •  3 года назад

      ​@@OliverRhyme i'm using hilt to inject just like in 1:53, but when executing anything in the ```init block```, it throws an error of repository not instantiated

    • @OliverRhyme
      @OliverRhyme 3 года назад

      @ you have an instantiation code for your repository??

  • @sanek1985t
    @sanek1985t 3 года назад

    Modern android development is a bird language - every time you have to remember these spells. How new incoming android developer can understand this?!
    It seems to me all this is very overcomplicated.

    • @IUfidi
      @IUfidi 2 года назад

      Senior dev level material.

  • @pvarela
    @pvarela 3 года назад +2

    Jesus Christ!!