Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #13 : Wrong Passcode Dot Issue #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
// implementation project(':mifos-passcode')
implementation 'com.mifos.mobile:mifos-passcode:0.3.0'
implementation project(':mifos-passcode')
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.NestedScrollView;
import android.support.v7.app.AppCompatActivity;
Expand Down Expand Up @@ -37,6 +38,7 @@ public abstract class MifosPassCodeActivity extends AppCompatActivity implements
private boolean isPassCodeVerified;
private String strPassCodeEntered;
private PasscodePreferencesHelper passcodePreferencesHelper;
private final long TIME_DELAY = 100;

public abstract int getLogo();

Expand Down Expand Up @@ -166,8 +168,18 @@ public void passCodeEntered(String passcode) {
} else {
mifosPassCodeView.startAnimation(shakeAnimation);
counter++;
mifosPassCodeView.clearPasscodeField();
showToaster(clRootview, R.string.incorrect_passcode);
new CountDownTimer(TIME_DELAY,TIME_DELAY) {
@Override
public void onTick(long millisUntilFinished) {

}

@Override
public void onFinish() {
mifosPassCodeView.clearPasscodeField();
showToaster(clRootview, R.string.incorrect_passcode);
}
}.start();
}
}
}
Expand Down