Android: keyboard no longer covers editor fields (S-19, S-15, S-6)
The recurring, category and account editors drew their scrolling body inside KvittScaffold with only the scaffold padding, so with adjustResize and edge-to-edge the keyboard overlaid the content and a focused field (S-19 day of month, notes) stayed hidden. Each body now applies padding(padding).consumeWindowInsets(padding).imePadding(), as S-7 does with imePadding(): the viewport shrinks above the keyboard and Compose's scroll container keeps the focused text field in view. Consuming the scaffold padding first stops the navigation inset (or the S-19 keypad bottom bar) from being counted twice. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
+3
-1
@@ -8,8 +8,10 @@ import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.FlowRow
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.consumeWindowInsets
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
@@ -165,7 +167,7 @@ private fun EditorForm(ui: AccountEditorUi, me: User, partner: User, actions: Ac
|
||||
if (ui.loaded && ui.editing == null && ui.online) focus.requestFocus()
|
||||
}
|
||||
Column(
|
||||
Modifier.fillMaxSize().padding(padding).verticalScroll(rememberScrollState()).padding(horizontal = spacing.gutter, vertical = spacing.s1),
|
||||
Modifier.fillMaxSize().padding(padding).consumeWindowInsets(padding).imePadding().verticalScroll(rememberScrollState()).padding(horizontal = spacing.gutter, vertical = spacing.s1),
|
||||
verticalArrangement = Arrangement.spacedBy(KvittDimens.dialogGap),
|
||||
) {
|
||||
if (!ui.online) {
|
||||
|
||||
Reference in New Issue
Block a user