Reputation: 91
So the case is, in the login screen of our app, one of user's phone always have his phone number popup as suggestion when he tips on the Phone Number box. like this image:
Only his device (Google Pixel 2) have this popup box. All of others android testing or daily using devices do not have this popup. I have tried couple ways to dismiss the popup, but non of them are working.
XML:
<EditText
android:id="@+id/phone_number"
android:background="@null"
android:layout_marginLeft="15dp"
android:layout_width="match_parent"
android:hint="@string/phone_num"
android:inputType="textVisiblePassword|textNoSuggestions|textFilter|phone"
android:layout_height="50dp" />
java file: phone_number.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
I have no idea what caused this popup and how to hide it. If you know the solution and reason behind it. Please help me. Many Thanks!
Upvotes: 5
Views: 3755
Reputation: 13
android:importantForAutofill="no"
tools:targetApi="o"
You can add it to the EditText property.
Upvotes: 0
Reputation: 1493
Just write the answer Maxim, as he did not notice in the comments:
android:importantForAutofill="noExcludeDescendants"
Helps on phones with pure Android.
Upvotes: 6
Reputation: 1040
This is a feature of Google Pixel 2 not your app fault. Try this on Pixel 2 :- Settings > System > Languages, inputs & gestures > Advanced > Autofill services > Select None instead of Autofill with google.
Hope this helps
Upvotes: 0