进行功能书写,页面跳转
private Button.OnClickListener btnlogin=new Button.OnClickListener(){
public void onClick(View v){
Intent it=new Intent();
it.setClass(MainActivity.this,AfterLoginActivity.class);
it.putExtra("str1", e1.getText().toString());
it.putExtra("str2", e2.getText().toString());
startActivity(it);
}
};
Intent intent=getIntent();
Bundle bundle=intent.getExtras();
v1.setText(bundle.getString("str1"));
v2.setText(bundle.getString("str2"));
public void onClick(View v){
Intent it=new Intent();
it.setClass(MainActivity.this,AfterLoginActivity.class);
it.putExtra("str1", e1.getText().toString());
it.putExtra("str2", e2.getText().toString());
startActivity(it);
}
};
Intent intent=getIntent();
Bundle bundle=intent.getExtras();
v1.setText(bundle.getString("str1"));
v2.setText(bundle.getString("str2"));