File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
compose/snippets/src/main/java/com/example/compose/snippets/adaptivelayouts Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package com.example.compose.snippets.adaptivelayouts
18
18
19
+ import androidx.activity.compose.BackHandler
19
20
import androidx.compose.foundation.background
20
21
import androidx.compose.foundation.clickable
21
22
import androidx.compose.foundation.layout.Column
@@ -48,7 +49,7 @@ import androidx.compose.ui.unit.sp
48
49
@Composable
49
50
fun SampleListDetailPaneScaffoldParts () {
50
51
// [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02]
51
- val navigator = rememberListDetailPaneScaffoldNavigator()
52
+ val navigator = rememberListDetailPaneScaffoldNavigator< Nothing > ()
52
53
// [END android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02]
53
54
54
55
// [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part01]
@@ -117,7 +118,11 @@ fun SampleListDetailPaneScaffoldFull() {
117
118
}
118
119
119
120
// Create the ListDetailPaneScaffoldState
120
- val navigator = rememberListDetailPaneScaffoldNavigator()
121
+ val navigator = rememberListDetailPaneScaffoldNavigator<Nothing >()
122
+
123
+ BackHandler (navigator.canNavigateBack()) {
124
+ navigator.navigateBack()
125
+ }
121
126
122
127
ListDetailPaneScaffold (
123
128
scaffoldState = navigator.scaffoldState,
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ kotlin = "1.9.20"
32
32
ksp = " 1.8.0-1.0.9"
33
33
maps-compose = " 4.3.2"
34
34
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 "
37
37
media3 = " 1.2.1"
38
38
# @keep
39
39
minSdk = " 21"
You can’t perform that action at this time.
0 commit comments