mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
fix: pad Hidden Words screen for bottom nav and gesture bars
The bottom add-word text field sat behind the phone's navigation and gesture bars. Apply the union of navigation bar and IME insets to the bottom bar so it clears the system bars and rises with the keyboard without a double-counted gap. https://claude.ai/code/session_01KPkQbS9SYTigkkzYGU97Sz
This commit is contained in:
+9
-3
@@ -26,10 +26,14 @@ import androidx.compose.foundation.combinedClickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
import androidx.compose.foundation.layout.ime
|
||||
import androidx.compose.foundation.layout.navigationBars
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.union
|
||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||
@@ -83,7 +87,6 @@ fun HiddenWordsScreen(
|
||||
var selected by remember { mutableStateOf(setOf<String>()) }
|
||||
|
||||
Scaffold(
|
||||
modifier = Modifier.imePadding(),
|
||||
topBar = {
|
||||
BlockListTopBar(
|
||||
title = R.string.hidden_words,
|
||||
@@ -104,7 +107,10 @@ fun HiddenWordsScreen(
|
||||
)
|
||||
},
|
||||
bottomBar = {
|
||||
Surface(tonalElevation = 3.dp) {
|
||||
Surface(
|
||||
tonalElevation = 3.dp,
|
||||
modifier = Modifier.windowInsetsPadding(WindowInsets.navigationBars.union(WindowInsets.ime)),
|
||||
) {
|
||||
AddMuteWordTextField(accountViewModel)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user