You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the "MultilineTextInput" with the "readonly" parameter set to "True" on Android, it will suggest spelling improvements based on dictionary candidates. This behavior results in underlined text on android devices when using a language other than the keyboard language or with unknown words in general.
Steps to reproduce
Use MultilineTextInput in readonly with a set text
Compile for android and set the KeyBoard language to a different one than the text.
The suggestions should appear, underlining the Text.
Expected behavior
Suggestions do not show up in MultilineTextInput if set to readonly.
Screenshots
No response
Environment
Operating System: Fedora 38 Workstation / Lineage OS 20.0
I did some research on the topic and while I'm not really an Android dev, I think I found the problem. In "android/src/toga_android/widgets/textinput.py" we need to set the flag TYPE_TEXT_FLAG_NO_SUGGESTIONS if "readonly" is true.
As said before, I'm not really an Android dev and am not sure how this would be implemented.
The text was updated successfully, but these errors were encountered:
For anyone interested in tackling this: TYPE_TEXT_FLAG_NO_SUGGESTIONS is a constant on the same interface as TYPE_CLASS_TEXT, the InputType that the Android TextInput already uses (see the create() method). Add a call to add/remove the no-suggestions constant as part of the set_readonly() implementation, and add validation that the property has been set in the test backend probe, and you're done.
Describe the bug
When using the "MultilineTextInput" with the "readonly" parameter set to "True" on Android, it will suggest spelling improvements based on dictionary candidates. This behavior results in underlined text on android devices when using a language other than the keyboard language or with unknown words in general.
Steps to reproduce
Expected behavior
Suggestions do not show up in MultilineTextInput if set to readonly.
Screenshots
No response
Environment
[tool.briefcase.app.trinker.android]
requires = [
#"toga-android~=0.3.1"
'git+https://github.com/beeware/toga.git#subdirectory=core',
'git+https://github.com/beeware/toga.git#subdirectory=android',
]
Logs
Additional context
I did some research on the topic and while I'm not really an Android dev, I think I found the problem. In "android/src/toga_android/widgets/textinput.py" we need to set the flag TYPE_TEXT_FLAG_NO_SUGGESTIONS if "readonly" is true.
As said before, I'm not really an Android dev and am not sure how this would be implemented.
The text was updated successfully, but these errors were encountered: