diff --git a/core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/atom/textfield/TextFieldOutlined.kt b/core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/atom/textfield/TextFieldOutlined.kt index 79ebb45ab1f..f91b9245947 100644 --- a/core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/atom/textfield/TextFieldOutlined.kt +++ b/core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/atom/textfield/TextFieldOutlined.kt @@ -1,5 +1,6 @@ package app.k9mail.core.ui.compose.designsystem.atom.textfield +import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview @@ -21,6 +22,7 @@ fun TextFieldOutlined( isRequired: Boolean = false, hasError: Boolean = false, isSingleLine: Boolean = true, + keyboardOptions: KeyboardOptions = KeyboardOptions.Default, ) { MaterialOutlinedTextField( value = value, @@ -32,6 +34,7 @@ fun TextFieldOutlined( readOnly = isReadOnly, isError = hasError, singleLine = isSingleLine, + keyboardOptions = keyboardOptions, ) } @@ -52,8 +55,8 @@ internal fun TextFieldOutlinedWithLabelPreview() { PreviewWithThemes { TextFieldOutlined( value = "Input text", - label = "Label", onValueChange = {}, + label = "Label", ) } } diff --git a/core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/molecule/input/TextInput.kt b/core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/molecule/input/TextInput.kt index 1c586d6a777..ef2aaa95e19 100644 --- a/core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/molecule/input/TextInput.kt +++ b/core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/molecule/input/TextInput.kt @@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.molecule.input import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview @@ -20,6 +21,7 @@ fun TextInput( contentPadding: PaddingValues = inputContentPadding(), isSingleLine: Boolean = true, isEnabled: Boolean = true, + keyboardOptions: KeyboardOptions = KeyboardOptions.Default, ) { InputLayout( modifier = modifier, @@ -35,6 +37,7 @@ fun TextInput( hasError = errorMessage != null, isSingleLine = isSingleLine, modifier = Modifier.fillMaxWidth(), + keyboardOptions = keyboardOptions, ) } } diff --git a/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/incoming/content/IncomingFormItems.kt b/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/incoming/content/IncomingFormItems.kt index d028615614c..8b30eaccdcf 100644 --- a/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/incoming/content/IncomingFormItems.kt +++ b/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/incoming/content/IncomingFormItems.kt @@ -4,6 +4,7 @@ import android.content.res.Resources import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.requiredHeight import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import app.k9mail.core.ui.compose.designsystem.molecule.input.NumberInput @@ -53,6 +54,7 @@ internal fun LazyListScope.incomingFormItems( onTextChange = { onEvent(Event.ServerChanged(it)) }, label = stringResource(id = R.string.account_server_settings_server_label), contentPadding = defaultItemPadding(), + keyboardOptions = KeyboardOptions(autoCorrect = false), ) } @@ -95,6 +97,7 @@ internal fun LazyListScope.incomingFormItems( onTextChange = { onEvent(Event.UsernameChanged(it)) }, label = stringResource(id = R.string.account_server_settings_username_label), contentPadding = defaultItemPadding(), + keyboardOptions = KeyboardOptions(autoCorrect = false), ) } diff --git a/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/outgoing/content/OutgoingFormItems.kt b/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/outgoing/content/OutgoingFormItems.kt index 5196e702a4c..4295e8c2969 100644 --- a/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/outgoing/content/OutgoingFormItems.kt +++ b/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/outgoing/content/OutgoingFormItems.kt @@ -4,6 +4,7 @@ import android.content.res.Resources import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.requiredHeight import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import app.k9mail.core.ui.compose.designsystem.molecule.input.NumberInput @@ -42,6 +43,7 @@ internal fun LazyListScope.outgoingFormItems( label = stringResource(id = R.string.account_server_settings_server_label), isRequired = true, contentPadding = defaultItemPadding(), + keyboardOptions = KeyboardOptions(autoCorrect = false), ) } @@ -87,6 +89,7 @@ internal fun LazyListScope.outgoingFormItems( label = stringResource(id = R.string.account_server_settings_username_label), isRequired = true, contentPadding = defaultItemPadding(), + keyboardOptions = KeyboardOptions(autoCorrect = false), ) } }