Disabling login button during password check and database decryption
This commit is contained in:
parent
e345d6d6cb
commit
d65b766655
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue