I am creating a login screen for my application with more than 1 authentication. Now when i login the app with the first name and password, then it works but when i try the other names and password then it force closes the application.
我正在利用Fe和Else进行原木筛查。
if (uName.equals("A") && uPass.equals("123"))
{
Intent cardSummaryScreen = new Intent(LoginActivity.this, Hi.class);
b = new Bundle();
EditText text1 = (EditText)findViewById(R.id.inputUserName);
b.putString("name", text1.getText().toString());
hi.putExtras(b);
startActivity(hi);
}
else if(uName.equals("sumit") && uPass.equals("456"))
{
Intent cardSummaryScreen1 = new
Intent(LoginActivity.this,Hi.class);
Bundle c= new Bundle();
EditText text2= (EditText)findViewById(R.id.inputUserName);
c.putString("name",text2.getText().toString());
startActivity(cardSummaryScreen1);