fix: add IME padding (#401)

This commit is contained in:
Diego Beraldin 2023-12-30 09:40:08 +01:00 committed by GitHub
parent 8ff6dfca84
commit d28f843a51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 73 additions and 57 deletions

View File

@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
@ -85,6 +86,7 @@ class BanUserScreen(
}
Box(
modifier = Modifier.imePadding(),
contentAlignment = Alignment.BottomCenter,
) {
Column(

View File

@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
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.size
import androidx.compose.foundation.lazy.LazyColumn
@ -111,7 +112,9 @@ class InboxChatScreen(
}
Scaffold(
modifier = Modifier.background(MaterialTheme.colorScheme.background)
modifier = Modifier
.imePadding()
.background(MaterialTheme.colorScheme.background)
.padding(Spacing.xs),
topBar = {
TopAppBar(

View File

@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.rememberScrollState
@ -158,6 +159,7 @@ class CreateCommentScreen(
}
Scaffold(
modifier = Modifier.imePadding(),
topBar = {
TopAppBar(
scrollBehavior = scrollBehavior,

View File

@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.text.KeyboardActions
@ -201,7 +202,9 @@ class CreatePostScreen(
}.launchIn(this)
}
Scaffold(topBar = {
Scaffold(
modifier = Modifier.imePadding(),
topBar = {
TopAppBar(
scrollBehavior = scrollBehavior,
navigationIcon = {

View File

@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
@ -79,6 +80,7 @@ class CreateReportScreen(
}
Box(
modifier = Modifier.imePadding(),
contentAlignment = Alignment.BottomCenter,
) {
Column(

View File

@ -8,6 +8,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.size
import androidx.compose.foundation.text.KeyboardActions
@ -98,6 +99,7 @@ class LoginBottomSheet : Screen {
val settingsRepository = remember { getSettingsRepository() }
Box(
modifier = Modifier.imePadding(),
contentAlignment = Alignment.BottomCenter,
) {
Column(

View File

@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
@ -79,6 +80,7 @@ class RemoveScreen(
}
Box(
modifier = Modifier.imePadding(),
contentAlignment = Alignment.BottomCenter,
) {
Column(