Disabling login button during password check and database decryption

This commit is contained in:
dankito 2020-10-07 20:56:18 +02:00
parent e345d6d6cb
commit d65b766655
2 changed files with 5 additions and 1 deletions

View File

@ -55,6 +55,8 @@ open class LoginActivity : BaseActivity() {
protected open fun checkEnteredPasswordAndLogIn() {
btnLogin.isEnabled = false
val enteredPassword = edtxtLoginPassword.text
if (authenticationService.isCorrectUserPassword(enteredPassword)) {
@ -62,6 +64,8 @@ open class LoginActivity : BaseActivity() {
navigateToMainActivity()
}
else {
btnLogin.isEnabled = true
Toast.makeText(this, R.string.activity_login_incorrect_password_entered, Toast.LENGTH_SHORT).show()
}
}

View File

@ -68,7 +68,7 @@
android:layout_width="@dimen/activity_login_button_login_width"
android:layout_height="@dimen/activity_login_button_login_height"
android:layout_gravity="end"
android:background="@color/colorAccent"
android:background="@drawable/conditionally_disabled_view_background"
android:textColor="@color/textBodyTextColor_Dark"
android:text="@string/activity_login_login_button_title"
/>