How To Turn Off Suggestions On a 4.1.1 OS Tablet

Mahares

Expert
Licensed User
Longtime User
I tried the following two methods on a Samsung Galaxy Tab2 7 inch to turn off suggestions, but neither works:
B4X:
inputText.InputType=Bit.OR(inputText.InputType, 524288)
or:
B4X:
inputText.InputType= 524288
Does anybody have a workaround.
Thank you very much
 

klaus

Expert
Licensed User
Longtime User
Try this one :
B4X:
inputText.InputType = Bit.Or(inputText.INPUT_TYPE_TEXT, 524288)
TYPE_TEXT_FLAG_NO_SUGGESTIONS is a flag for the TYPE_CLASS_TEXT class.

Best regards.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I tried this per Klaus's suggestion, but still shows suggestions:
B4X:
Dim inputText As InputDialog
      inputText.PasswordMode=True
      inputText.InputType = Bit.OR(inputText.INPUT_TYPE_TEXT, 524288) 'Does not work
 
Upvote 0

gregmartin64

Member
Licensed User
Longtime User
This will also only work when you compile with API version 5 and above, also, devices do not have to honor the request :confused:

In Java I used to use the setThreshold() method to set the number of characters+1 of the input length that must be entered before a prediction is made. But I don't think this is exposed in B4A? Maybe Erel can answer that.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Erel Asks: Does it work on your device with a regular EditText?
Mahares Answers: It is still showing suggestions even with an edittext on Tab2 OS4.1.1. I even changed the SDK from 4 to 10, but it did not help.
I tried a tablet with OS 4.03. it works properly (no suggestion) with an edit text and an inputext dialog box.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I hope someone can still answer this thread for me since I am dealing with a password input that should not show suggestions, as my post #7 was accidentally covered up by an unrelated post.
Thanks
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Unfortunately the gregmartin64 suggestion of using setThreshold won't work as it applies to the AutoCompleteTextView type and not the EditText type used by Basic4android.

However EditText1.InputType = 144 seems to work on my Xoom. 144 is InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD. You could also try 128 which is InputType.TYPE_TEXT_VARIATION_PASSWORD and has the same effect as 144 on my Xoom.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
@Andrew (agraham): Using 144 as you suggested works on the Samsung Tab2. It does suppress the suggestions.
I appreciate your value to the forum
 
Upvote 0
Top