louiskirsch/QuickDynalist

Quick add input field does not autocorrect

Closed this issue · 8 comments

When I use quick add the input text box it does not perform autocorrections as I type. It does show the autocorrect bar, but it won't actually make active corrections. I believe this is a setting in the EditText box.

Can you change this to perform active corrections, or was this intentional? I think it would be a really useful change, and if this was intentional it would be nice to have a settings toggle for this as I'm sure others want this as well.

Loving the app, thanks for all of the hard work!

I was not aware that this is a setting -- will look into it. Thanks.

Developer reference here: https://developer.android.com/training/keyboard-input/style

You want to enable textAutoCorrect value for android:inputType attribute in EditText.

It seems like the fix does not work with the Google Keyboard, but works with SwiftKey.

It looks like SwiftKey always ignores app EditText flags in favor of user preferences: https://stackoverflow.com/a/21047514/903996

So the autocorrect behavior has probably always been like that with SwiftKey, whereas GBoard adheres to Google Developer guidelines.

Based on code use of textAutoCorrect on Github it looks like android:inputType="text|textAutoCorrect" is rarely used, it's usually just android:inputType="textAutoCorrect": https://github.com/search?q=textAutoCorrect&type=Code

I'm not sure why that would cause the issue as I would think that textAutoCorrect flag would take precedence, but it probably is worth investigating.

I think this is the culprit: https://github.com/timediv/QuickDynalist/blob/2ac2c29fcd03283ef7fc81b8387d27a6e542eae5/app/src/main/java/com/louiskirsch/quickdynalist/utils/Extensions.kt#L32

inputType is being set programmatically overriding the layout value. So this should include or InputType.TYPE_TEXT_FLAG_AUTO_CORRECT.

You are right, thanks.

I have a PR ready with the change (#8). If it looks okay, can you merge it in?

Will do!