Merge pull request #774 from brainynai/passwordMismatchWarning
Added password mismatch warning for intro screen
This commit is contained in:
commit
2c78ce04cd
2 changed files with 8 additions and 0 deletions
|
@ -275,6 +275,7 @@ public class IntroScreenActivity extends IntroActivity {
|
|||
private String lengthWarning = "";
|
||||
private String noPasswordWarning = "";
|
||||
private String confirmPasswordWarning = "";
|
||||
private String passwordMismatchWarning = "";
|
||||
|
||||
private TextView desc = null;
|
||||
private Spinner selection = null;
|
||||
|
@ -432,6 +433,7 @@ public class IntroScreenActivity extends IntroActivity {
|
|||
lengthWarning = getString(R.string.settings_label_short_password, minLength);
|
||||
noPasswordWarning = getString(R.string.intro_slide3_warn_no_password);
|
||||
confirmPasswordWarning = getString(R.string.intro_slide3_warn_confirm_password);
|
||||
passwordMismatchWarning = getString(R.string.intro_slide3_warn_password_mismatch);
|
||||
|
||||
focusOnPasswordInput();
|
||||
}
|
||||
|
@ -458,6 +460,7 @@ public class IntroScreenActivity extends IntroActivity {
|
|||
lengthWarning = getString(R.string.settings_label_short_pin, minLength);
|
||||
noPasswordWarning = getString(R.string.intro_slide3_warn_no_pin);
|
||||
confirmPasswordWarning = getString(R.string.intro_slide3_warn_confirm_pin);
|
||||
passwordMismatchWarning = getString(R.string.intro_slide3_warn_pin_mismatch);
|
||||
|
||||
focusOnPasswordInput();
|
||||
}
|
||||
|
@ -506,6 +509,9 @@ public class IntroScreenActivity extends IntroActivity {
|
|||
if (! confirm.isEmpty() && confirm.equals(password)) {
|
||||
hideWarning();
|
||||
return true;
|
||||
} else if (! confirm.isEmpty() && ! confirm.equals(password)) {
|
||||
updateWarning(passwordMismatchWarning);
|
||||
return false;
|
||||
} else {
|
||||
updateWarning(confirmPasswordWarning);
|
||||
return false;
|
||||
|
|
|
@ -33,7 +33,9 @@
|
|||
<string name="intro_slide3_warn_no_password">Please set a password to continue!</string>
|
||||
<string name="intro_slide3_warn_no_pin">Please set a PIN to continue!</string>
|
||||
<string name="intro_slide3_warn_confirm_password">Please confirm your password to continue!</string>
|
||||
<string name="intro_slide3_warn_password_mismatch">Passwords must match!</string>
|
||||
<string name="intro_slide3_warn_confirm_pin">Please confirm your PIN to continue!</string>
|
||||
<string name="intro_slide3_warn_pin_mismatch">Pins must match!</string>
|
||||
|
||||
<string name="intro_slide4_title">Finished</string>
|
||||
<string name="intro_slide4_desc">Your settings have been saved, you are now all set to use
|
||||
|
|
Loading…
Reference in a new issue