fix: 页面内容被系统状态栏遮挡
This commit is contained in:
parent
a15f78bb3e
commit
f801741608
2 changed files with 5 additions and 2 deletions
|
|
@ -58,7 +58,8 @@ fun LargeTopAppBarScaffold(
|
|||
)
|
||||
}
|
||||
},
|
||||
scrollBehavior = scrollBehavior
|
||||
scrollBehavior = scrollBehavior,
|
||||
contentWindowInsets = contentWindowInsets
|
||||
) { innerPadding ->
|
||||
Box { content(innerPadding) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ import androidx.compose.animation.fadeOut
|
|||
import androidx.compose.animation.shrinkOut
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.safeContent
|
||||
import androidx.compose.foundation.layout.safeContentPadding
|
||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
|
|
@ -96,6 +98,7 @@ fun MainPage(
|
|||
)
|
||||
}
|
||||
},
|
||||
contentWindowInsets = WindowInsets.safeContent,
|
||||
modifier = modifier
|
||||
) { innerPadding ->
|
||||
if (windowSizeClass.windowWidthSizeClass == WindowWidthSizeClass.COMPACT) {
|
||||
|
|
@ -180,7 +183,6 @@ fun MainPage(
|
|||
selectedTodoIds = selectedTodoIds.value,
|
||||
modifier = Modifier
|
||||
.weight(3f)
|
||||
.safeContentPadding()
|
||||
.fillMaxSize()
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue