ICS - disable spellchecking in EditText??

moster67

Expert
Licensed User
Longtime User
I am experimenting a bit with ICS using the emulator.

I have included the following statement in Manifest.xml:

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>

Two questions in this regard:
1) how can I disable the automatic spellchecking (and the underlining of wrongly spellt words) in editTexts. I found this but I don't know where to put it in the manifest.xml:

android:inputType="textNoSuggestions"

Is it possible to disable spellchecking for some editTexts and leave others with spellchecking enabled?

2) Is it possible to get rid of the application-icon which ICS put at the top of each screen? It consumes a lot of vertical space

Thanks!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. You can set the no suggestions flag with:
B4X:
EditText1.InputType = Bit.Or(EditText1.InputType, 524288)

2. With reflection:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   RemoveHomeIcon
End Sub

Sub RemoveHomeIcon
   Dim r As Reflector
   r.Target = r.GetActivity
   r.Target = r.RunMethod("getActionBar")
   r.RunMethod2("setDisplayShowHomeEnabled", False, "java.lang.boolean")
End Sub
 
Upvote 0

David Hawkins

Active Member
Licensed User
Longtime User
Hi Erel

I have bluetooth keyboard with a 10" tablet and unfortunately I don't get any suggestions when using it. I was looking for another way of spell checking can you think of any thing that i could utilise.

Regards

David
 
Upvote 0

geoffschultz

Member
Licensed User
Longtime User
An alternate way to disable suggestions on a per-EditText field is to set the Input_Type to 129 (TYPE_TEXT_VARIATION_VISIBLE_PASSWORD OR TYPE_CLASS_TEXT)

i.e. etField.Input_Type = 129
 
Last edited:
Upvote 0
Top