mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-09 16:17:44 +00:00
fix weird double window insets
This commit is contained in:
parent
a8bd9058e7
commit
761b56fdc3
1 changed files with 10 additions and 8 deletions
|
@ -113,8 +113,7 @@ fun <T: Any?> SearchScreen(
|
|||
) {
|
||||
var searchText by rememberSaveable(stateSaver = TextFieldValue.Saver) { mutableStateOf(TextFieldValue()) }
|
||||
Column(Modifier.fillMaxSize()) {
|
||||
// todo: saving is good on orientation change, but bad on pressing back...
|
||||
var showSearch by rememberSaveable { mutableStateOf(false) }
|
||||
var showSearch by remember { mutableStateOf(false) }
|
||||
|
||||
fun setShowSearch(value: Boolean) {
|
||||
showSearch = value
|
||||
|
@ -182,12 +181,15 @@ fun <T: Any?> SearchScreen(
|
|||
CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.bodyLarge) {
|
||||
if (searchText.text.isBlank() && content != null) {
|
||||
Column(
|
||||
Modifier
|
||||
.windowInsetsPadding(
|
||||
WindowInsets.safeDrawing.only(
|
||||
WindowInsetsSides.Horizontal + WindowInsetsSides.Bottom
|
||||
)
|
||||
)
|
||||
// todo: how and where to best deal with insets?
|
||||
// here? manifest android:windowSoftInputMode="adjustResize"?
|
||||
// other?
|
||||
// Modifier
|
||||
// .windowInsetsPadding(
|
||||
// WindowInsets.safeDrawing.only(
|
||||
// WindowInsetsSides.Horizontal + WindowInsetsSides.Bottom
|
||||
// )
|
||||
// )
|
||||
) {
|
||||
content()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue