Disable autofill in form fields

This commit is contained in:
J-Jamet
2021-07-20 19:10:22 +02:00
parent c15c11f3b1
commit 263d433193

View File

@@ -1,6 +1,7 @@
package com.kunzisoft.keepass.view
import android.content.Context
import android.os.Build
import android.util.AttributeSet
import android.view.View
import androidx.annotation.IdRes
@@ -65,6 +66,9 @@ class TemplateEditView @JvmOverloads constructor(context: Context,
setMaxChars(templateAttribute.options.getNumberChars())
setMaxLines(templateAttribute.options.getNumberLines())
setActionClick(templateAttribute, field, this)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
importantForAutofill = View.IMPORTANT_FOR_AUTOFILL_NO
}
}
}
}
@@ -75,6 +79,9 @@ class TemplateEditView @JvmOverloads constructor(context: Context,
TextSelectFieldView(it).apply {
setItems(templateAttribute.options.getListItems())
setActionClick(templateAttribute, field, this)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
importantForAutofill = View.IMPORTANT_FOR_AUTOFILL_NO
}
}
}
}