0.跳转页
Intent intent =new Intent(BasicDataActivity.this,CityPickerActivity.class);
startActivityForResult(intent,110);
startActivity(CityPickerActivity.class);
1.传值页
Intent cityData =new Intent(this, BasicDataActivity.class);
cityData.putExtra("cityContent", city);
setResult(1111, cityData);
2.接收页
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case 1111:
String city = data.getStringExtra("cityContent");
homeTV.setText(city);
Log.e("返回城市: ", "返回城市: "+city);
break;
}
}