Fix warning

This commit is contained in:
J-Jamet committed 2021-08-30 11:13:38 +02:00
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