Fixed
Status Update
Comments
il...@google.com <il...@google.com>
th...@gmail.com <th...@gmail.com> #2
Second this
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 591b82c85dd94dfee2daf5e264751b2286f3b1e7
Author: Ian Lake <ilake@google.com>
Date: Mon Jun 21 15:59:03 2021
Add support for Composable Dialog destinations
In addition to `composable` destinations that
take up the whole space of the `NavHost`,
add support for `dialog` destinations that will
be shown within a Composable Dialog.
This support is added by default to
`rememberNavController()` and `NavHost`.
Relnote: "`NavHost` now supports `dialog` destinations
in addition to `composable` destinations. These
dialog destinations will each be shown within
a Composable `Dialog`, floating above the
current `composable` destination."
Test: new DialogNavigationTest suite, samples
BUG: 179608120
Change-Id: I011d03df5689a72e938d755c9c6da2b0f72eb162
M navigation/navigation-compose/api/current.txt
M navigation/navigation-compose/api/public_plus_experimental_current.txt
M navigation/navigation-compose/api/restricted_current.txt
M navigation/navigation-compose/samples/src/main/java/androidx/navigation/compose/samples/NavigationSamples.kt
M navigation/navigation-compose/samples/src/main/res/values/strings.xml
A navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/DialogNavigatorTest.kt
M navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavHostTest.kt
A navigation/navigation-compose/src/main/java/androidx/navigation/compose/DialogNavigator.kt
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavGraphBuilder.kt
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHost.kt
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHostController.kt
https://android-review.googlesource.com/1740060
Branch: androidx-main
commit 591b82c85dd94dfee2daf5e264751b2286f3b1e7
Author: Ian Lake <ilake@google.com>
Date: Mon Jun 21 15:59:03 2021
Add support for Composable Dialog destinations
In addition to `composable` destinations that
take up the whole space of the `NavHost`,
add support for `dialog` destinations that will
be shown within a Composable Dialog.
This support is added by default to
`rememberNavController()` and `NavHost`.
Relnote: "`NavHost` now supports `dialog` destinations
in addition to `composable` destinations. These
dialog destinations will each be shown within
a Composable `Dialog`, floating above the
current `composable` destination."
Test: new DialogNavigationTest suite, samples
BUG: 179608120
Change-Id: I011d03df5689a72e938d755c9c6da2b0f72eb162
M navigation/navigation-compose/api/current.txt
M navigation/navigation-compose/api/public_plus_experimental_current.txt
M navigation/navigation-compose/api/restricted_current.txt
M navigation/navigation-compose/samples/src/main/java/androidx/navigation/compose/samples/NavigationSamples.kt
M navigation/navigation-compose/samples/src/main/res/values/strings.xml
A navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/DialogNavigatorTest.kt
M navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavHostTest.kt
A navigation/navigation-compose/src/main/java/androidx/navigation/compose/DialogNavigator.kt
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavGraphBuilder.kt
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHost.kt
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHostController.kt
il...@google.com <il...@google.com> #4
We've added support for dialog
destinations which will appear above the previous composable
destination that you can navigate()
to just like any other destination.
NavHost(navController, startDestination = Screen.Home.route) {
composable(Screen.Home.route) {
HomeScreen(onOpenDialog = {
// Opening the dialog is just like any other destination - just navigate() to it.
navController.navigate(Screen.Dialog.route)
})
}
dialog(Screen.Dialog.route) {
// The content here will be added to a Dialog() Composable
DialogContent()
}
}
il...@google.com <il...@google.com> #5
This will be available in Navigation 2.4.0-alpha02.
il...@google.com <il...@google.com> #6
And by alpha02 I mean Navigation 2.4.0-alpha04
, apologies.
ma...@gmail.com <ma...@gmail.com> #7
Is it possible to control the transparency alpha of the background?
Description
Component used: Navigation Version used:
Since there is a
dialog
for the NavGraphBuilder, it would be nice to have something likecomposableDialog
for Jetpack Compose.