Android Jetpack: Manage UI navigation with navigation controller (Google I/O '18)

Поділитися
Вставка
  • Опубліковано 12 гру 2024

КОМЕНТАРІ • 73

  • @atanasdoychinov6491
    @atanasdoychinov6491 6 років тому +19

    I waited so much time for something like this. It's a big improvement for the Android developers life! Thank you!

  • @thiagoalexandreee
    @thiagoalexandreee 6 років тому +55

    Now the iOS developers that work near me can't mock me anymore for not having a storyboard :D

    • @JimPekarek
      @JimPekarek 6 років тому +18

      And we can continue to mock them every time they run into merge conflicts with their storyboards. It's a win-win!

    • @nickolaysavchenko2582
      @nickolaysavchenko2582 6 років тому +4

      ​@@JimPekarek hello from 2019, navigation editor not working properly, as always all new features not production-ready - data binding, navigation... Looks like experiment, but not as usable feature.

    • @faridmammadov5989
      @faridmammadov5989 5 років тому

      @@nickolaysavchenko2582 exactly, Android is late to game in on this subject. They're trying to do something to keep up but apparently it blew up in Android core team's face ))

    • @Cutie_pie636
      @Cutie_pie636 2 роки тому

      D
      D

    • @Cutie_pie636
      @Cutie_pie636 2 роки тому

      @@JimPekarek dndb
      D bdv
      Dd
      B
      Dbd
      Bd
      B
      DVD dad

  • @MalvinSutanto
    @MalvinSutanto 6 років тому +16

    How do I handle CollapsingToolbarLayout for specific Fragment if I have Toolbar that is placed in the Activity?
    Do I hide the Activity's Toolbar and then handle Fragment's Toolbar separately? How will this affect the up navigation?

    • @michaelnajera7958
      @michaelnajera7958 6 років тому +2

      It would be great if the activity could own the toolbar and each fragment has the option of implementing a collapsing toolbar. Why do I have to embed a toolbar in a collapsing toolbar layout?

    • @punicharana
      @punicharana 6 років тому +1

      See other talk ua-cam.com/video/WVPH48lUzGY/v-deo.html

  • @baieEtMotte
    @baieEtMotte 6 років тому +12

    Finally after 10 years they are starting to understand that Android Fragments and UI design are completely shitty... And then they take inspiration from Apple ? Really ? What is going wrong with you Google ?

  • @faridmammadov5989
    @faridmammadov5989 5 років тому +4

    Every back button or navigation item selection recreates the whole fragment. So what is the use of this if I can't keep the last state of the fragment state.

    • @antonigalon
      @antonigalon 3 роки тому

      State of the fragment should be stored and restored in ViewModel, as Fragments are volatile

  • @CDehning
    @CDehning 6 років тому +3

    Will there be a
    implementation 'android.arch.navigation:navigation-activity:1.0.0-alpha01'
    that fixes the up and back button handling for activities without the need to switch to this Fragment style?

  • @ich_iel
    @ich_iel 5 років тому +2

    There is no proper way to update the toolbar based on the navigation destination... Currently It's basically impossible to implement a destination with a SearchView in the toolbar...

  • @ruif3r
    @ruif3r 4 роки тому +2

    how to prevent recreating the whole fragment everytime I select a bottomnav item

  • @lostheptapod6382
    @lostheptapod6382 6 років тому +7

    Why call it NavHost instead of NavigationHost? just introduces unnecessary inconsistency

  • @sathishgadde1924
    @sathishgadde1924 5 років тому +2

    How to prevent fragment recreate during pop behavior ? Like Second fragment to first fragment .

    • @ruif3r
      @ruif3r 4 роки тому +1

      no solution yet?

  • @amarpreetsingh857
    @amarpreetsingh857 5 років тому +3

    Navigation component crashes.
    java.lang.IllegalArgumentException: navigation destination
    😫😫😫😫

  • @josesilva-rodriguez5088
    @josesilva-rodriguez5088 5 років тому

    I wish they would of covered the tablet example or an example of when you have multiple fragments on the screen...

  • @aegirlt
    @aegirlt 6 років тому +1

    With larger applications with many fragments - can you have multiple .xml files for the navigation graph or can you only have one very large graph for the entire project?

    • @skolarii
      @skolarii 5 років тому

      Since Google is pushing for a single activity navigation where the activity is just an entry point it makes more sense to have just one huge and highly complex navigation graph for the entire project

  • @md.imamulislam7
    @md.imamulislam7 4 роки тому

    What's the software they are using for demo @ 5:28?

  • @harshpatel-bt5wr
    @harshpatel-bt5wr 3 роки тому

    is there any workaround given by navigation component to handle multiple backstack in android as specially in java ?

  • @witoldsienski1709
    @witoldsienski1709 6 років тому

    Nice idea but what should we do with tablet navigation?

  • @MalkaviaInteractive
    @MalkaviaInteractive 5 років тому

    Hello, I tried this but I have an issue accessing a nested graph fragment inside another nested graph from the root navhost. (Like from Home to contacts nested graph, contacts being inside the account nested graph). Global action does not work from root only from the account nested graph. And if I extract contacts from the account nested graph it works BUT the "selected" icon in my bottom navigation view will be "home" and not "account" :'(

  • @colza1025
    @colza1025 5 років тому

    it's just like iOS. Thanks for doing this.

  • @KoreanLabx
    @KoreanLabx 5 років тому

    is it just for Fragments?

  • @mYSt74
    @mYSt74 6 років тому +2

    Does it working with custom controller instead of fragment (for example conductor controllers)?

    • @lukasb0
      @lukasb0 6 років тому

      yes, you can create your own subclass of Navigator to handle custom destination types

  • @KeySabre
    @KeySabre 6 років тому +2

    Can a fragment in the navigation graph have multiple pop-to fragments? Can a navigation graph looks like a net?
    For example in the case of 06:17, what if an app has multiple entries to the user_profile? Or I'll need to create multiple separate paths?

  • @juliolemus2489
    @juliolemus2489 6 років тому +3

    How I do handle shared elements on transitions from FragmentA to FragmentB? :O

    • @IanLake
      @IanLake 6 років тому +13

      Shared Element support is coming soon!

  • @lornaakoth3038
    @lornaakoth3038 4 роки тому

    Prior to migrating to androidx I used the support navigation activity and heavily used activities as opposed to fragments.On migration to androidx i got an error on oncreate.How then do i use the navigation controller on layouts because it only accepts R.id.next and not R.layout.next

  • @eduardocucharro
    @eduardocucharro 6 років тому +2

    How do I add business logic to the navigation? You showed static navigation, what about dynamic?

    • @lukasb0
      @lukasb0 6 років тому +3

      check the documentation, there's a section on conditional navigation

  • @sathishgadde1924
    @sathishgadde1924 6 років тому

    How to manage fragment state duting backstack. Like first contains recyclerview and user scroll to end then onitemclick navigate to second screen. now if user back to previous fragment there is not state managed. it is possible or not.if possible how to manage ?

  • @VincentFischer
    @VincentFischer 6 років тому +7

    All the pain I had to suffer over the last years now seam so unnecessary

  • @nafisakhsan
    @nafisakhsan 6 років тому

    That really good improvement

  • @bartekpacia
    @bartekpacia 5 років тому

    What about Instant Apps? How is it supposed to work with them?

  • @ernaus22
    @ernaus22 6 років тому

    You can't use findViewById in a fragment... getview()?.findViewById is correct ?

  • @RobertPetras
    @RobertPetras 6 років тому

    Can we use Android Jetpack on an Android 7 targeted devices?

  • @nickolaysavchenko2582
    @nickolaysavchenko2582 6 років тому +4

    Hello from 2019, navigation editor not working properly, as always all new features not production-ready - data binding, navigation... Looks like experiment, but not as usable feature.

  • @LucasdeAlmeidaMarciano
    @LucasdeAlmeidaMarciano 6 років тому

    How do i get this presentation?

  • @Zhuinden
    @Zhuinden 6 років тому

    8:06 what is the role of the Activity? Yup, it is *not just "a screen"* :D

  • @dominykaszaksas8299
    @dominykaszaksas8299 6 років тому

    What is Steve Merchant is doing there?

  • @olegalekos2181
    @olegalekos2181 3 роки тому

    HOW TO MAKE A DEEP_LINK OPEN A FRAGMENT WITHOUT BACKSTACK ?

  • @ashishkhandelwal4692
    @ashishkhandelwal4692 6 років тому

    Are they doing all navigation work in android studio? please reply me

  • @zappzapp2074
    @zappzapp2074 6 років тому +5

    Patching, Patching and Patching, what is the next? what is the end?

    • @FauzieRofi
      @FauzieRofi 6 років тому +1

      There's no end in technology. It'll always be evolving.

  • @rahulkatte3402
    @rahulkatte3402 6 років тому

    Added depdencies, still unable find this "navigation editor". Anyone had any luck with this ?

    • @FauzieRofi
      @FauzieRofi 6 років тому

      You have to use Android Studio 3.2 canary 14 or 15

  • @nishithpandya_vlog
    @nishithpandya_vlog 6 років тому +2

    why they copy ios i dont understand and even if they copy they cam make it better but these are only good for fragment transactions Not activity result

  • @youngminyu4120
    @youngminyu4120 4 роки тому

    thank you very much

  • @ismaeldecamargorosa8831
    @ismaeldecamargorosa8831 3 роки тому

    Welcome...

  • @tonyliu9428
    @tonyliu9428 5 років тому

    Nice! I will be happy to follow and learn from you. :P
    Oh by the way, is it ok if I can also seek your advice in this open source android app I have posted below? Just need some feedback about it...
    Just need to search ' *pub:Path Ahead* ' in Google Play (P & A are case sensitive).
    thanks a-hundred !!

  • @John-qt6qk
    @John-qt6qk 5 років тому

    Awesome

  • @typingcat
    @typingcat 6 років тому +17

    Why do all these new things look like iOS?

    • @MichalMlejnek
      @MichalMlejnek 6 років тому

      Exactly what i was asking...

    • @RenatKaitmazov
      @RenatKaitmazov 6 років тому +1

      Maybe to attract iOS developers?

    • @BoxingHacker
      @BoxingHacker 6 років тому +6

      Only , thing. ANDROID IS BETTER LOL

    • @LiranBarsisa
      @LiranBarsisa 6 років тому

      Why? It's good that they stay there. Good for competition.
      Also, that's nothing. See the monstresity they made here:
      ua-cam.com/video/jdKUm8tGogw/v-deo.html
      Really ruined material design. Centered title, ugly FAB in the middle, action item (of profile) on the right...
      And it's not the only example I've seen there...
      It has already started. Check the newstand app. Even the search action item on the left...

    • @JouviGrouvi
      @JouviGrouvi 6 років тому +2

      Because Apple did it right the first time. The only thing I really don't like about the storyboards and xibs, is that you cant use a language like xml to write them without the UI builder.

  • @PS18041994
    @PS18041994 6 років тому +3

    Guys re-invented Cicerone library from terrakok

    • @MegaLittlePaw
      @MegaLittlePaw 6 років тому

      Cicerone is used in one of my work projects, and it's not that convenient and safe, especially when talking about arguments.

    • @MegaLittlePaw
      @MegaLittlePaw 6 років тому

      And Cicerone doesn't have that beautiful navigation graph editor, plus it demands you to write more boilerplate code instead of removing it of.

  • @70ME3E
    @70ME3E 6 років тому

    put speed to at least 2x
    I need more than that via JS hack
    x)

  • @gerdsfargen6687
    @gerdsfargen6687 5 місяців тому

    eklasa