Created
May 27, 2014 07:03
-
-
Save rainyear/010858f9eca1817e766e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void checkInput() { | |
input = (EditText) findViewById(R.id.passpwd); | |
input2 = (EditText) findViewById(R.id.passpwd2); | |
submit = (Button) findViewById(R.id.submit); | |
imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); | |
// imm.showSoftInput(null, 0); | |
submit.setOnClickListener(new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
// TODO Auto-generated method stub | |
String input_txt = input.getText().toString(); | |
String input_txt2 = input2.getText().toString(); | |
if (!input_txt.equals(input_txt2) || input_txt.length() == 0) { | |
Toast.makeText(SetLock.this, "請輸入相同的密碼!", Toast.LENGTH_SHORT) | |
.show(); | |
return; | |
} | |
// if (input_txt.length() != 3 || input_txt2.length() != 3) { | |
// Toast.makeText(SetLock.this, "請輸入三位數字!", Toast.LENGTH_SHORT) | |
// .show(); | |
// return; | |
// } | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment