Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Oreo disable autofill for EditText

I'm trying to disable autofill for all EditText's except my login screen. And no success yet. There is always "Autofill" option after longPress on editText. IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS for rootView or IMPORTANT_FOR_AUTOFILL_NO for view gives no effect at all.

Any ideas? Thanks.

like image 895
Kuva Avatar asked Dec 12 '17 13:12

Kuva


2 Answers

maybe you have the same problem as I had I mixed-up suggestion and auto-fill, then I set importantForAutofill to false and everything was fine

like image 62
Kostya Rudenko Avatar answered Oct 26 '22 01:10

Kostya Rudenko


you can pass "no" to importantForAutofill e.g.

<EditText
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:importantForAutofill="no" />
like image 9
aliraza12636 Avatar answered Oct 26 '22 03:10

aliraza12636