mirror of
https://github.com/twofas/2fas-android.git
synced 2024-11-21 17:59:50 +01:00
Fix keyboard type for password fields
This commit is contained in:
parent
36c26a1a8a
commit
79792ab444
@ -22,6 +22,8 @@ import androidx.compose.ui.graphics.Shape
|
|||||||
import androidx.compose.ui.semantics.semantics
|
import androidx.compose.ui.semantics.semantics
|
||||||
import androidx.compose.ui.text.TextRange
|
import androidx.compose.ui.text.TextRange
|
||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
|
import androidx.compose.ui.text.input.KeyboardCapitalization
|
||||||
|
import androidx.compose.ui.text.input.KeyboardType
|
||||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||||
import androidx.compose.ui.text.input.TextFieldValue
|
import androidx.compose.ui.text.input.TextFieldValue
|
||||||
import androidx.compose.ui.text.input.VisualTransformation
|
import androidx.compose.ui.text.input.VisualTransformation
|
||||||
@ -146,7 +148,11 @@ fun TwOutlinedTextFieldPassword(
|
|||||||
labelText = labelText,
|
labelText = labelText,
|
||||||
supportingText = supportingText,
|
supportingText = supportingText,
|
||||||
isError = isError,
|
isError = isError,
|
||||||
keyboardOptions = keyboardOptions,
|
keyboardOptions = keyboardOptions.copy(
|
||||||
|
keyboardType = KeyboardType.Password,
|
||||||
|
capitalization = KeyboardCapitalization.None,
|
||||||
|
autoCorrect = false
|
||||||
|
),
|
||||||
keyboardActions = keyboardActions,
|
keyboardActions = keyboardActions,
|
||||||
singleLine = singleLine,
|
singleLine = singleLine,
|
||||||
maxLines = maxLines,
|
maxLines = maxLines,
|
||||||
|
@ -158,7 +158,8 @@ internal fun EditServiceScreen(
|
|||||||
onValueChange = {},
|
onValueChange = {},
|
||||||
keyboardOptions = KeyboardOptions.Default.copy(
|
keyboardOptions = KeyboardOptions.Default.copy(
|
||||||
keyboardType = KeyboardType.Password,
|
keyboardType = KeyboardType.Password,
|
||||||
capitalization = KeyboardCapitalization.None
|
capitalization = KeyboardCapitalization.None,
|
||||||
|
autoCorrect = false
|
||||||
),
|
),
|
||||||
visualTransformation = if (isSecretVisible) VisualTransformation.None else PasswordVisualTransformation(),
|
visualTransformation = if (isSecretVisible) VisualTransformation.None else PasswordVisualTransformation(),
|
||||||
trailingIcon = {
|
trailingIcon = {
|
||||||
|
Loading…
Reference in New Issue
Block a user