Android Question How to disable spellcheck in AS TextFieldAdvanced?

Tareq Khan

Member
Licensed User
Longtime User
I would like to disable spellcheck in AS TextFieldAdvanced, so that I don't see the red underline below texts.

I tried the following, but it crashes.

B4X:
Private Sub DisableSpellcheckAS(tf As AS_TextFieldAdvanced)
    ' Get the internal B4XView containing the native EditText
    Dim tfJO As JavaObject = tf 
    Dim bxv As B4XView = tfJO.GetField("m_EditText")
    
    ' Get the native EditText view from the B4XView
    Dim etJO As JavaObject = bxv
    etJO.RunMethod("setInputType", Array(Bit.Or(0x00080000, 0x00000090))) ' NO_SUGGESTIONS | VISIBLE_PASSWORD
End Sub

Can you please help? Thanks.
 
Top