agraham Expert Licensed User Longtime User Jan 15, 2019 #1 In Android 8.1.0 and later EditText seems to have grown a spelling checker that is on by default causing unwanted underlining of the contents. When I search the Web I see various solutions have been proposed but some seem to have side effects or don't work and others require specifying in the XML layout that B4A doesn't use. Has anyone else seen and overcome this?
In Android 8.1.0 and later EditText seems to have grown a spelling checker that is on by default causing unwanted underlining of the contents. When I search the Web I see various solutions have been proposed but some seem to have side effects or don't work and others require specifying in the XML layout that B4A doesn't use. Has anyone else seen and overcome this?
jimmyF Active Member Licensed User Longtime User Jan 15, 2019 #2 I use this class: https://www.b4x.com/android/forum/threads/class-input-type-constants.28091/#post-172330 I believe you need to use the SLInpTypeConst.TYPE_TEXT_FLAG_NO_SUGGESTIONS flag It works well for me. hth Upvote 0
I use this class: https://www.b4x.com/android/forum/threads/class-input-type-constants.28091/#post-172330 I believe you need to use the SLInpTypeConst.TYPE_TEXT_FLAG_NO_SUGGESTIONS flag It works well for me. hth
agraham Expert Licensed User Longtime User Jan 15, 2019 #3 Thanks for the suggestion but that seems to have the unfortunate effect on a multiline TextEdit, as I have also seen reported on the Web, of removing all the new line characters Upvote 0
Thanks for the suggestion but that seems to have the unfortunate effect on a multiline TextEdit, as I have also seen reported on the Web, of removing all the new line characters
jimmyF Active Member Licensed User Longtime User Jan 15, 2019 #4 Did you try calling: Code: EditText.SingleLine=False immediately after setting the flag? That works for me. Upvote 0
Did you try calling: Code: EditText.SingleLine=False immediately after setting the flag? That works for me.
Erel B4X founder Staff member Licensed User Longtime User Jan 15, 2019 #5 This works here: Code: EditText1.InputType = Bit.Or(0x00080000, 0x00000090) 'TYPE_TEXT_FLAG_NO_SUGGESTIONS | TYPE_TEXT_VARIATION_VISIBLE_PASSWORD EditText1.SingleLine = False There is a small risk here as different keyboards can treat the "password" flag in different ways. Upvote 0
This works here: Code: EditText1.InputType = Bit.Or(0x00080000, 0x00000090) 'TYPE_TEXT_FLAG_NO_SUGGESTIONS | TYPE_TEXT_VARIATION_VISIBLE_PASSWORD EditText1.SingleLine = False There is a small risk here as different keyboards can treat the "password" flag in different ways.
agraham Expert Licensed User Longtime User Jan 15, 2019 #6 Thanks both. Resetting the multi-line mode was the key. I've used Code: edtSource.InputType = 0x00080000 'TYPE_TEXT_FLAG_NO_SUGGESTIONS edtSource.SingleLine = False as it doesn't seem to need TYPE_TEXT_VARIATION_VISIBLE_PASSWORD for my use case. Upvote 0
Thanks both. Resetting the multi-line mode was the key. I've used Code: edtSource.InputType = 0x00080000 'TYPE_TEXT_FLAG_NO_SUGGESTIONS edtSource.SingleLine = False as it doesn't seem to need TYPE_TEXT_VARIATION_VISIBLE_PASSWORD for my use case.