logeshpalani31
logeshpalani31

Reputation: 1628

How to stop edittext auto suggestion with email input type Programmatically in Android

How to disable auto suggestion with input type : textEmailAddress, while using like below the auto suggestion will appear, exactly want stop auto suggestion with email keyboard.

Used Code

<EditText
    android:hint="Logesh"
    android:inputType="textEmailAddress|textNoSuggestions|textMultiLine "
    android:layout_width="match_parent"
    android:importantForAutofill="no"
    android:layout_height="match_parent" />

and i tried below also

<EditText
    android:hint="Logesh"
    android:inputType="textEmailAddress|textVisiablePassword"
    android:layout_width="match_parent"
    android:importantForAutofill="no"
    android:layout_height="match_parent" />

when using textVisiblePassword that input of keyboard "@" not shown.

Thanks in advance !

Upvotes: 8

Views: 1629

Answers (5)

Sylphe
Sylphe

Reputation: 1553

I’m not sure it’s exactly what you were looking for, but I needed a way to keep the keyboard layout with the @ and shortcuts, but avoid saving the email in the keyboard suggestions for privacy purposes, as it’s for a kiosk app.

In the end I managed it by using:

android:importantForAutofill="no"
android:inputType="textWebEmailAddress"

Upvotes: 1

Divy Soni
Divy Soni

Reputation: 836

android:importantForAutofill="no"
android:inputType="textEmailAddress"

These two lines worked for me.

Upvotes: 1

Abhishek
Abhishek

Reputation: 329

Add this one in your EditText -

android:inputType="textFilter|textEmailAddress|textNoSuggestions"

and remove android:importantForAutofill="no"

Upvotes: 2

Diogo Jorge
Diogo Jorge

Reputation: 21

android:inputType="textNoSuggestions"

Android has great documentation, check the InputType section of TextViews here

Upvotes: 0

GreenROBO
GreenROBO

Reputation: 4910

Can you try by adding textFilter property in your android:inputType?

android:inputType="textFilter|textEmailAddress|textVisiablePassword" 

Upvotes: 0

Related Questions