Debloat your Android TV, install apps, browse and transfer files on it, all from your phone. Just 3 MB, no tracking, no root, no PC.
Remote: the keyboard resizes the screen instead of panning it
jesse-agent-23297a439ba8add
diff --git a/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt b/app/src/main/java/app/tellyscope/ui/RemoteScreen.ktindex 874e5b8..8295b78 100644--- a/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt+++ b/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt@@ -2,6 +2,8 @@package app.tellyscope.ui+import android.view.WindowManager+import androidx.activity.compose.LocalActivityimport androidx.compose.animation.core.animateFloatAsStateimport androidx.compose.foundation.backgroundimport androidx.compose.foundation.clickable@@ -22,6 +24,7 @@ import androidx.compose.foundation.layout.Spacerimport androidx.compose.foundation.layout.fillMaxSizeimport androidx.compose.foundation.layout.fillMaxWidthimport androidx.compose.foundation.layout.height+import androidx.compose.foundation.layout.imePaddingimport androidx.compose.foundation.layout.offsetimport androidx.compose.foundation.layout.paddingimport androidx.compose.foundation.layout.size@@ -81,6 +84,7 @@ import androidx.compose.material3.rippleimport androidx.compose.material3.toShapeimport androidx.compose.runtime.Composableimport androidx.compose.runtime.CompositionLocalProvider+import androidx.compose.runtime.DisposableEffectimport androidx.compose.runtime.LaunchedEffectimport androidx.compose.runtime.getValueimport androidx.compose.runtime.key@@ -185,6 +189,14 @@ fun RemoteScreen(val screenOff = device.id in state.screenOff// Android 14 moved the call that turns the picture off out of the shell's reach.val screenControl = (device.android?.substringBefore('.')?.toIntOrNull() ?: 0) < 14 || screenOff+ // The keyboard shrinks this screen instead of panning the window, which jumped on every keystroke.+ val window = LocalActivity.current?.window+ DisposableEffect(window) {+ if (window == null) return@DisposableEffect onDispose {}+ val before = window.attributes.softInputMode+ window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)+ onDispose { window.setSoftInputMode(before) }+ }var confirmReboot by rememberSaveable { mutableStateOf(false) }if (confirmReboot) RebootDialog(onRestart = { confirmReboot = false; actions.reboot() }, onDismiss = { confirmReboot = false })// Hide keeps a restart in the top bar; the dialog comes back when the wait moves on, or on a tap there.@@ -223,7 +235,7 @@ fun RemoteScreen(},) { pad ->Column(- Modifier.fillMaxSize().padding(pad).verticalScroll(rememberScrollState()).padding(horizontal = 16.dp, vertical = 8.dp),+ Modifier.fillMaxSize().padding(pad).imePadding().verticalScroll(rememberScrollState()).padding(horizontal = 16.dp, vertical = 8.dp),horizontalAlignment = Alignment.CenterHorizontally,verticalArrangement = Arrangement.spacedBy(20.dp),) {