Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 74a4c39

Browse files
committed
Fix #13 : Wrong Passcode Dot Issue
1 parent 26fbc44 commit 74a4c39

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ dependencies {
2424
testImplementation 'junit:junit:4.12'
2525
androidTestImplementation 'com.android.support.test:runner:1.0.1'
2626
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
27-
// implementation project(':mifos-passcode')
28-
implementation 'com.mifos.mobile:mifos-passcode:0.3.0'
27+
implementation project(':mifos-passcode')
2928
}

mifos-passcode/src/main/java/com/mifos/mobile/passcode/MifosPassCodeActivity.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.content.Context;
44
import android.content.Intent;
55
import android.os.Bundle;
6+
import android.os.CountDownTimer;
67
import android.support.v4.content.ContextCompat;
78
import android.support.v4.widget.NestedScrollView;
89
import android.support.v7.app.AppCompatActivity;
@@ -37,6 +38,7 @@ public abstract class MifosPassCodeActivity extends AppCompatActivity implements
3738
private boolean isPassCodeVerified;
3839
private String strPassCodeEntered;
3940
private PasscodePreferencesHelper passcodePreferencesHelper;
41+
private final long TIME_DELAY = 100;
4042

4143
public abstract int getLogo();
4244

@@ -166,8 +168,18 @@ public void passCodeEntered(String passcode) {
166168
} else {
167169
mifosPassCodeView.startAnimation(shakeAnimation);
168170
counter++;
169-
mifosPassCodeView.clearPasscodeField();
170-
showToaster(clRootview, R.string.incorrect_passcode);
171+
new CountDownTimer(TIME_DELAY,TIME_DELAY) {
172+
@Override
173+
public void onTick(long millisUntilFinished) {
174+
175+
}
176+
177+
@Override
178+
public void onFinish() {
179+
mifosPassCodeView.clearPasscodeField();
180+
showToaster(clRootview, R.string.incorrect_passcode);
181+
}
182+
}.start();
171183
}
172184
}
173185
}

0 commit comments

Comments
 (0)