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

Commit 1240485

Browse files
committed
Fix #13 : Wrong Passcode Dot Issue
1 parent cc00d4b commit 1240485

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ 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')
27+
implementation project(':mifos-passcode')
2828
implementation 'com.mifos.mobile:mifos-passcode:0.3.0'
2929
}

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;
@@ -35,6 +36,7 @@ public abstract class MifosPassCodeActivity extends AppCompatActivity implements
3536
private boolean isPassCodeVerified;
3637
private String strPassCodeEntered;
3738
private PasscodePreferencesHelper passcodePreferencesHelper;
39+
private final long TIME_DELAY = 100;
3840

3941
public abstract int getLogo();
4042

@@ -162,8 +164,18 @@ public void passCodeEntered(String passcode) {
162164
startHomeActivity();
163165
} else {
164166
counter++;
165-
mifosPassCodeView.clearPasscodeField();
166-
showToaster(clRootview, R.string.incorrect_passcode);
167+
new CountDownTimer(TIME_DELAY,TIME_DELAY) {
168+
@Override
169+
public void onTick(long millisUntilFinished) {
170+
171+
}
172+
173+
@Override
174+
public void onFinish() {
175+
mifosPassCodeView.clearPasscodeField();
176+
showToaster(clRootview, R.string.incorrect_passcode);
177+
}
178+
}.start();
167179
}
168180
}
169181
}

0 commit comments

Comments
 (0)