Add extra padding to text field when keyboard is open
This allows users to be able to scroll all the way to the bottom of long documents without the keyboard obscuring the text
This commit is contained in:
parent
f891d3635d
commit
a35aa62399
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@ import androidx.compose.foundation.layout.Row
|
|||
import androidx.compose.foundation.layout.RowScope
|
||||
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.layout.size
|
||||
import androidx.compose.foundation.pager.HorizontalPager
|
||||
|
@ -254,7 +255,8 @@ fun MainScreen(
|
|||
if (page == 0) {
|
||||
TextField(
|
||||
modifier = Modifier
|
||||
.fillMaxSize(),
|
||||
.fillMaxSize()
|
||||
.imePadding(),
|
||||
colors = TextFieldDefaults.colors(
|
||||
focusedContainerColor = MaterialTheme.colorScheme.surface,
|
||||
unfocusedContainerColor = MaterialTheme.colorScheme.surface,
|
||||
|
|
Loading…
Reference in a new issue