Created
June 5, 2018 10:06
-
-
Save mladenrakonjac/b4cd9018cd01ef8639e91a1cbe1ab931 to your computer and use it in GitHub Desktop.
This file contains 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
public void loginMethod(String name, String password){ | |
if (isEmpty(name)) { | |
editName.setError("Username is empty"); | |
return; | |
} | |
if (isEmpty(password)) { | |
editPasword.setError("Password is empty"); | |
return; | |
} | |
if(!name.equals(username)) { | |
editName.setError("Username is incorrect"); | |
return; | |
} | |
if(!password.equals(userpassword)) { | |
editPasword.setError("Password is incorrect"); | |
return; | |
} | |
Intent intent=new Intent(MainActivity.this,Main2Activity.class); | |
startActivity(intent); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment