agrosner
03/12/2024, 3:22 PMStylianos Gakis
03/12/2024, 4:47 PMagrosner
03/12/2024, 8:59 PMagrosner
03/12/2024, 8:59 PMStylianos Gakis
03/12/2024, 9:27 PMagrosner
03/12/2024, 9:48 PMStylianos Gakis
03/12/2024, 10:08 PMStylianos Gakis
03/13/2024, 10:01 PMagrosner
03/13/2024, 10:02 PMStylianos Gakis
03/13/2024, 10:03 PMIan Lake
03/13/2024, 10:30 PMAndroidFragment
being removed from composition (e.g., like if the composable destination goes onto the back stack)Ian Lake
03/13/2024, 10:31 PMAndroidViewBinding
integration now too, so if that's been fine for you, this will be similar in that respectIan Lake
03/13/2024, 10:37 PMcomposable
destinations to your Navigation with Fragment's navigation graphagrosner
03/13/2024, 10:37 PMIan Lake
03/13/2024, 10:39 PMAndroidFragment
to let you write fragment
destinations in your NavHost
(where it would just use AndroidFragment
as the UI of your individual destination)agrosner
03/13/2024, 10:43 PMIan Lake
03/13/2024, 10:47 PMAndroidFragment
and the Navigation things mentioned above will make it easier to transition between Navigation with Fragments and Navigation Compose when it makes sense for your appIan Lake
03/13/2024, 10:48 PMAndroidFragment
is not planning on being part of the currently Fragment 1.7 release, but as part of a future Fragment 1.8 release and it does require new public APIs added to FragmentManager and FragmentTransaction to work, so it won't be something you can necessarily copy/paste - you'll need to use Fragment 1.8 releases in any caseStylianos Gakis
03/13/2024, 10:49 PMcomposable<Destination> {
val viewModel by hilt/koin/whateverViewModel()
AndroidFragment()
}
Will you get the right restoration on your VM, since it’s not inside the fragment? Going around this limitation?Ian Lake
03/13/2024, 10:49 PMStylianos Gakis
03/13/2024, 10:50 PMIan Lake
03/13/2024, 10:51 PMStylianos Gakis
03/13/2024, 10:54 PMagrosner
03/13/2024, 10:55 PMStylianos Gakis
03/13/2024, 10:55 PMIan Lake
03/13/2024, 11:00 PMAndroidViewBinding
is still quite good for a single static fragment, just has the cost of requiring you write that one XML file per screen (which will go away when you can use AndroidFragment
)