【问题标题】:Android Oreo disable autofill for EditTextAndroid Oreo 禁用 EditText 的自动填充
【发布时间】:2020-09-22 06:07:27
【问题描述】:

我正在尝试禁用所有EditText 的自动填充,但我的登录屏幕除外。而且还没有成功。在editText 上的longPress 之后总是有“自动填充”选项。 rootView 的 IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS 或视图的 IMPORTANT_FOR_AUTOFILL_NO 完全没有效果。

有什么想法吗?谢谢。

【问题讨论】:

标签: android android-8.0-oreo android-autofill-manager


【解决方案1】:

也许你和我有同样的问题 我混淆了建议和自动填充, 然后我将importantForAutofill 设置为false,一切都很好

【讨论】:

    【解决方案2】:

    你可以传递“no”importantAuroFill 例如

    <EditText
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:importantForAutofill="no" />
    

    【讨论】:

    • 请用 更新,因为问的问题与 TextView 无关
    猜你喜欢
    • 2019-05-17
    • 2012-03-17
    • 2023-03-16
    • 1970-01-01
    • 2018-03-30
    • 1970-01-01
    • 2013-03-22
    相关资源
    最近更新 更多