Skip to content

Commit 1b8b1fa

Browse files
authored
Update material3-adaptive to alpha06 (#216)
1 parent 2800143 commit 1b8b1fa

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts/SampleListDetailPaneScaffold.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.example.compose.snippets.adaptivelayouts
1818

19+
import androidx.activity.compose.BackHandler
1920
import androidx.compose.foundation.background
2021
import androidx.compose.foundation.clickable
2122
import androidx.compose.foundation.layout.Column
@@ -48,7 +49,7 @@ import androidx.compose.ui.unit.sp
4849
@Composable
4950
fun SampleListDetailPaneScaffoldParts() {
5051
// [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02]
51-
val navigator = rememberListDetailPaneScaffoldNavigator()
52+
val navigator = rememberListDetailPaneScaffoldNavigator<Nothing>()
5253
// [END android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02]
5354

5455
// [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part01]
@@ -117,7 +118,11 @@ fun SampleListDetailPaneScaffoldFull() {
117118
}
118119

119120
// Create the ListDetailPaneScaffoldState
120-
val navigator = rememberListDetailPaneScaffoldNavigator()
121+
val navigator = rememberListDetailPaneScaffoldNavigator<Nothing>()
122+
123+
BackHandler(navigator.canNavigateBack()) {
124+
navigator.navigateBack()
125+
}
121126

122127
ListDetailPaneScaffold(
123128
scaffoldState = navigator.scaffoldState,

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ kotlin = "1.9.20"
3232
ksp = "1.8.0-1.0.9"
3333
maps-compose = "4.3.2"
3434
material = "1.11.0"
35-
material3-adaptive = "1.0.0-alpha05"
36-
material3-adaptive-navigation-suite = "1.0.0-alpha02"
35+
material3-adaptive = "1.0.0-alpha06"
36+
material3-adaptive-navigation-suite = "1.0.0-alpha03"
3737
media3 = "1.2.1"
3838
# @keep
3939
minSdk = "21"

0 commit comments

Comments
 (0)