2

I use an EditText widget to get user input which is sensitive, i.e., the input should not be stored for auto-completion lateron.

In the code I tried several combinations of

setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);

or

setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);

or even both.

It works on almost all my test devices, except several Samsung phones and a single Sony device. For example on the Samsung Galaxy 4 the mechanism works as expceted, but the Samsung S3 ignores the EditText's configuration and presents the sensitive input for auto-completion lateron. Of course, Google's documentation does not give any information about how to reliably disable the auto-completion cache for an EditText. Any idea why this works for some devices but not for other devices? Thanks.

EricJobs
  • 153
  • 2
  • 7

2 Answers2

0

Turn off autosuggest for EditText?

Check this link .

android:inputType="textFilter"
Community
  • 1
  • 1
acid_srvnn
  • 693
  • 8
  • 15
  • You misunterstood the question. I don't want to turn of autosuggest for MY EditText. Somehow the information entered in MY EditText is cached for autosuggest of OTHER EditTexts. – EricJobs Jul 15 '14 at 09:16
0

Try this in your activity:

Java:

edittext.setInputType(android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);

or with the XML attribute:

android:inputType="textVisiblePassword"
The Amateur Coder
  • 789
  • 3
  • 11
  • 33
Khanjan
  • 183
  • 8