Android Oreo disable autofill for EditText
Asked Answered
S

2

11

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.

Selfpollination answered 12/12, 2017 at 13:5 Comment(3)
than make your Editext android:longClickable="false"Gravimeter
Please provide a minimal reproducible example demonstrating how you are trying to block autofill.Karmen
Possible duplicate of Disabling Android O auto-fill service for an applicationTympanum
N
14

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

<EditText
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:importantForAutofill="no" />
Norther answered 9/4, 2020 at 16:3 Comment(1)
please update with <EditText/> as asked question does not relate with TextViewVariometer
B
8

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

Back answered 1/6, 2018 at 13:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.