当我编译应用程序时,它显示应用程序使用或覆盖已弃用的 API 的错误
mEmailView = findViewById(R.id.login_email);
mPasswordView = findViewById(R.id.login_password);
googleButton = findViewById(R.id.google_button);
mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
if (id == R.integer.login || id == EditorInfo.IME_NULL) {
attemptLogin();
return true;
}
return false;
}
});
textView3 = findViewById(R.id.textView3);
String text = "<font color=#cc0029>S</font><font color=#37BAF5>U</font><font color=#E000EE>M</font><font color=#BF0731>O</font>";
textView3.setText(Html.fromHtml(text));
textView3.setScaleX(2.5f);
// instance of FirebaseAuth
}
public void signInExistingUser(View v) {
// Call attemptLogin() here
attemptLogin();
}
public void registerNewUser(View v) {
Intent intent = new Intent(this, com.one4all.sumotwo.RegisterActivity.class);
finish();
startActivity(intent);
}
private void attemptLogin() {
String email = mEmailView.getText().toString();
String password = mPasswordView.getText().toString();
if (email.equals("") || password.equals("")) {
return;
} else {
Toast.makeText(this, "Login progress...", Toast.LENGTH_SHORT).show();
}
慕娘9325324
相关分类