activity 见传递数据


传
Bundle bundle = new Bundle();
bundle.putString("goFromMain", "main");
Intent intent = new Intent();
intent.setClass(this, ItemEditActivity.class);
intent.putExtras(bundle);
startActivity(intent);

接
Bundle bundle = getIntent().getExtras();
if (null != bundle) {
	goFromMain = bundle.getString("goFromMain");
}




你可能感兴趣的:(java)