From 20bc0b841cc9dd3cce2e5b7c448eba461044a691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=C2=A0Koby=C5=82ko?= Date: Sun, 17 Dec 2023 13:07:55 +0100 Subject: [PATCH] Fix ime padding on browser ext request screen --- .../ui/request/BrowserExtRequestScreen.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/feature/browserext/src/main/java/com/twofasapp/feature/browserext/ui/request/BrowserExtRequestScreen.kt b/feature/browserext/src/main/java/com/twofasapp/feature/browserext/ui/request/BrowserExtRequestScreen.kt index 4a7b813b..c923f787 100644 --- a/feature/browserext/src/main/java/com/twofasapp/feature/browserext/ui/request/BrowserExtRequestScreen.kt +++ b/feature/browserext/src/main/java/com/twofasapp/feature/browserext/ui/request/BrowserExtRequestScreen.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn @@ -19,12 +20,9 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue -import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.focus.FocusRequester import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -95,9 +93,6 @@ private fun ScreenContent( ) { val strings = TwLocale.strings val backDispatcher = LocalBackDispatcher - val focusRequester = remember { FocusRequester() } - val focusManager = LocalFocusManager.current - Scaffold( topBar = { @@ -112,7 +107,11 @@ private fun ScreenContent( } } ) { padding -> - LazyColumn(modifier = Modifier.padding(padding)) { + LazyColumn( + modifier = Modifier + .padding(padding) + .imePadding() + ) { item { Text( text = strings.browserRequestInfo.format(uiState.browserName, uiState.domain),