Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't disable predictive text

I'm trying to disable predictive text for a given EditText, as explained here, but I still get the autocomplete by the prediction...

I've got a Samsung Galaxy S with XT9 enabled.

Anybody can help?

<EditText
    android:id="@+id/search_field"
    android:layout_width="300dp"
    android:layout_height="27dp"
    android:background="@drawable/bg_searchfield"
    android:hint="@string/search_hint"
    android:imeOptions="actionSearch"
    android:inputType="text|textNoSuggestions|textFilter"/>
like image 284
jul Avatar asked May 08 '12 08:05

jul


1 Answers

The only solution that worked for me to see the right font on hint and on text using the Calligraphy library is:

  • Set your password EditText in your xml with android:inputType="textNoSuggestions|textVisiblePassword"
  • Configure your EditText programmatically with: passwordET.transformationMethod = PasswordTransformationMethod()

This will:

  1. Show the correct font on hint
  2. Show the correct font on text
  3. Show the correct font if you've got a TextInputLayout
  4. Will not show suggestion or predictions in your keyboard.
like image 180
Rafael Ruiz Muñoz Avatar answered Oct 21 '22 08:10

Rafael Ruiz Muñoz