0
공유 환경 설정을 사용하고 있는데 다른 조건이 있지만 텍스트 상자를 터치하지 않고 로그인 버튼을 클릭하면 다른 활동이 시작되고 텍스트 상자에 입력을 입력 한 후 그 이유는 무엇입니까?입력없이 로그인 버튼을 클릭하면 다른 활동이 시작됩니까?
login.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences sharedPref = getSharedPreferences("userinfo",Context.MODE_PRIVATE);
final String name =sharedPref.getString("username","");
if(userLogInText.getText().toString().trim().equalsIgnoreCase(name)){
Intent intent = new Intent(getApplicationContext(),MyActivity.class);
startActivity(intent);
}
else {
Toast.makeText(getApplicationContext(),"Registration ID is not Matching",Toast.LENGTH_LONG).show();
}
}
});
감사합니다. @Niranj Patel ... – wasim