|
| 1 | +/* |
| 2 | + * Copyright 2025 The Android Open Source Project |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
1 | 17 | package com.example.compose.snippets.adaptivelayouts |
2 | 18 |
|
3 | 19 | import androidx.compose.foundation.background |
@@ -52,9 +68,10 @@ fun SampleNavigableSupportingPaneScaffoldFull() { |
52 | 68 | NavigableSupportingPaneScaffold( |
53 | 69 | navigator = scaffoldNavigator, |
54 | 70 | mainPane = { |
55 | | - AnimatedPane(modifier = Modifier |
56 | | - .safeContentPadding() |
57 | | - .background(Color.Red) |
| 71 | + AnimatedPane( |
| 72 | + modifier = Modifier |
| 73 | + .safeContentPadding() |
| 74 | + .background(Color.Red) |
58 | 75 | ) { |
59 | 76 | if (scaffoldNavigator.scaffoldValue[SupportingPaneScaffoldRole.Supporting] == PaneAdaptedValue.Hidden) { |
60 | 77 | Button( |
@@ -91,7 +108,8 @@ fun ThreePaneScaffoldPaneScope.MainPane( |
91 | 108 | modifier: Modifier = Modifier, |
92 | 109 | ) { |
93 | 110 | AnimatedPane( |
94 | | - modifier = modifier.safeContentPadding()) { |
| 111 | + modifier = modifier.safeContentPadding() |
| 112 | + ) { |
95 | 113 | // Main pane content |
96 | 114 | if (shouldShowSupportingPaneButton) { |
97 | 115 | Button(onClick = onNavigateToSupportingPane) { |
@@ -153,7 +171,7 @@ fun SampleSupportingPaneScaffoldSimplifiedWithPredictiveBackHandler() { |
153 | 171 |
|
154 | 172 | SupportingPaneScaffold( |
155 | 173 | directive = scaffoldNavigator.scaffoldDirective, |
156 | | - scaffoldState = scaffoldNavigator.scaffoldState, |
| 174 | + scaffoldState = scaffoldNavigator.scaffoldState, |
157 | 175 | mainPane = { |
158 | 176 | MainPane( |
159 | 177 | shouldShowSupportingPaneButton = scaffoldNavigator.scaffoldValue.secondary == PaneAdaptedValue.Hidden, |
|
0 commit comments