Fix small bugs

This commit is contained in:
J-Jamet committed 2021-08-23 10:00:36 +02:00
1 parent df51b62041
commit 7afbc9f5a4
2 files changed
+9 -7

No files matched your search

@@ -155,13 +155,15 @@ open class PasswordActivity : DatabaseModeActivity(), AdvancedUnlockFragment.Bui
checkboxPasswordView?.isChecked = true
}
})
passwordView?.setOnEditorActionListener(OnEditorActionListener { _, _, keyEvent ->
if (keyEvent.keyCode == KEYCODE_ENTER) {
passwordView?.setOnKeyListener { _, _, keyEvent ->
var handled = false
if (keyEvent.action == KeyEvent.ACTION_DOWN
&& keyEvent?.keyCode == KEYCODE_ENTER) {
verifyCheckboxesAndLoadDatabase()
return@OnEditorActionListener true
handled = true
}
false
})
handled
}
// If is a view intent
getUriFromIntent(intent)
@@ -438,7 +440,7 @@ open class PasswordActivity : DatabaseModeActivity(), AdvancedUnlockFragment.Bui
enableOrNotTheConfirmationButton()
// Auto select the password field and open keyboard
passwordView?.requestFocus()
passwordView?.requestFocusFromTouch()
val imm: InputMethodManager? =
getSystemService(INPUT_METHOD_SERVICE) as? InputMethodManager?
imm?.showSoftInput(passwordView, InputMethodManager.SHOW_IMPLICIT)