Disabling Android O auto-fill service for an application

后端 未结 10 1761
死守一世寂寞
死守一世寂寞 2020-11-27 05:13

Android O has the feature to support Auto-filling for fields. Is there any way I can disable it for a specific application. That is I want to force my application not to use

10条回答
  •  再見小時候
    2020-11-27 06:02

    Seems to be a bug that needs to be fixed : https://issuetracker.google.com/issues/67675432
    In the meanwhile a workaround for now is to disable the AutoFill feature for the whole project. You can add in the values-v26/styles.xml file the following style or you can edit your BaseEditTextStyle if you are using a specific style for your EditText views.

    
    

    and in the values-v26/themes.xml file you can simply add to the default theme that you are using in your app the items editTextStyle and android:editTextStyle like following :

    
    

    this way you can apply this changes for all your EditTexts without needing to change your layout files or Activities (and later on you can easily remove it when the bug is fixed).

提交回复
热议问题