Skip to content

A rootless Android app that boots Alpine Linux: run containers (Podman/Docker/LXC) and GUI desktop apps.

x11: imePadding so extra-keys row rides above the soft keyboard

ExTv3fbecbb7002c
diff --git a/app/src/main/java/com/excp/podroid/ui/screens/x11/X11Screen.kt b/app/src/main/java/com/excp/podroid/ui/screens/x11/X11Screen.kt
index df812e7..1a35c6b 100644
--- a/app/src/main/java/com/excp/podroid/ui/screens/x11/X11Screen.kt
+++ b/app/src/main/java/com/excp/podroid/ui/screens/x11/X11Screen.kt
@@ -19,10 +19,13 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
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.fillMaxWidth
+import androidx.compose.foundation.layout.ime
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicTextField
@@ -187,7 +190,15 @@ fun X11Screen(
}
}
- Column(modifier = Modifier.fillMaxSize().background(Color.Black)) {
+ Column(
+ modifier = Modifier
+ .fillMaxSize()
+ .background(Color.Black)
+ // Push the bottom of the layout up by the IME height when the
+ // soft keyboard opens. Effect: extra-keys row rides above the
+ // keyboard, AndroidView (weight=1) shrinks to fill the gap.
+ .windowInsetsPadding(WindowInsets.ime)
+ ) {
TopAppBar(
title = { Text("X11") },
navigationIcon = {