mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-29 05:13:03 -08:00
Fix warning
This commit is contained in:
1 parent
31eb0fb48a
commit
a06ea8fe55
2 files changed
+3
-3
No files matched your search
@@ -62,7 +62,8 @@ class TemplateEditView @JvmOverloads constructor(context: Context,
|
||||
field: Field): TextEditFieldView? {
|
||||
return context?.let {
|
||||
TextEditFieldView(it).apply {
|
||||
setProtection(field.protectedValue.isProtected, mHideProtectedValue)
|
||||
// hiddenProtectedValue (mHideProtectedValue) don't work with TextInputLayout
|
||||
setProtection(field.protectedValue.isProtected)
|
||||
setMaxChars(templateAttribute.options.getNumberChars())
|
||||
setMaxLines(templateAttribute.options.getNumberLines())
|
||||
setActionClick(templateAttribute, field, this)
|
||||
|
||||
@@ -161,8 +161,7 @@ class TextEditFieldView @JvmOverloads constructor(context: Context,
|
||||
}
|
||||
}
|
||||
|
||||
fun setProtection(protection: Boolean, hiddenProtectedValue: Boolean) {
|
||||
// hiddenProtectedValue don't work with TextInputLayout
|
||||
fun setProtection(protection: Boolean) {
|
||||
if (protection) {
|
||||
labelView.endIconMode = TextInputLayout.END_ICON_PASSWORD_TOGGLE
|
||||
valueView.inputType = valueView.inputType or InputType.TYPE_TEXT_VARIATION_PASSWORD
|
||||
|
||||
Reference in new issue
Block a user