Today, we released Navigation Compose 2.4.0-alpha0...
# compose
i
Today, we released Navigation Compose 2.4.0-alpha01: https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0-alpha01 - Navigation Compose joins the rest of the Navigation artifacts with just a single version code, no more 1.0.0 alphas. This also means that concepts like routes (which used to be extension methods you needed to import) are now APIs on the classes themselves and there's no more
arguments?.getString(KEY_ROUTE)
- it is just
destination.route
. It also means that Navigation Compose gained support for new functionality added to Navigation including multiple back stacks
๐Ÿ‘๐Ÿฝ 1
๐ŸŽ‰ 6
๐Ÿ‘๐Ÿผ 2
๐Ÿฆœ 9
๐Ÿ‘ 36
We've updated the bottom nav guide to show how to use the new
saveState
and
restoreState
APIs to enable multiple back stacks in Navigation Compose: https://developer.android.com/jetpack/compose/navigation#bottom-nav
And Chris wrote a PR for Tivi that handles more complicated cases: https://twitter.com/chrisbanes/status/1394745403929731080
๐Ÿ‘ 1
I'll also note that while there's no transition APIs in this release, the merging of Navigation Compose with the rest of Navigation is key to making that happen for an upcoming release
K 1
โค๏ธ 3
๐Ÿ’ช๐Ÿฝ 1
r
Thanks for the hard work, Ian! This looks great. Just in time for my Compose app ๐Ÿ˜„
t
@Ian Lake played around with the multiple backstack support for fragments and looks good! Thank for all your work! Wanted to ask if this will be the standard for fragments / compose going forward. Asking because our app has its own multiple back stack implementation which works exactly like the youtube app (pops all stacks in each tab in the order the user visited them when tapping back) vs
NavigationAdvancedSample
which only pops the current tab stack then switches to main tab and exiting the app when its stack is cleared.