UI创建按钮及事件
Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button);
mEmailSignInButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
//Do Sth
}
});
调用Activity
Intent intent = new Intent();
intent.setClass(LoginActivity.this,MainActivity.class);
startActivity(intent);
LoginActivity.this.finish();