Android Compose TextField with underline on misspelled words

82 views Asked by At

How I can create a TextField where if any word is misspelled it will create underline under the word or highlight for the user to go back if needed and click on it and the keyboard should show the suggested words.

Something like writing in Word where it let you continue writing but with wiggly red line if misspelled to go back and fix it.

some thing like this:

Windows example for wiggly red line

Normal TextField but it did not highlight the misspilled words.

1

There are 1 answers

4
tasjapr On

Try to add keyboardOptions to your Textfield with disabled autoCorrect

keyboardOptions = KeyboardOptions(
    keyboardType = KeyboardType.Email,
    autoCorrect = false
)