Android 从捆中串回
从第一次活动开始Android 从捆中串回,android,string,bundle,Android,String,Bundle,从第一次活动开始 Intent IntentButton = new Intent(); IntentButton.setClass(this, PaliActivity2.class); IntentButton.putExtra("EditText123", EditText1.getText().toString()); startActivity(IntentButton); 第二项活动 protected void onCreate(Bundle savedInstanceState
Intent IntentButton = new Intent();
IntentButton.setClass(this, PaliActivity2.class);
IntentButton.putExtra("EditText123", EditText1.getText().toString());
startActivity(IntentButton);
第二项活动
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.nextscreen);
Bundle BundleFrom1 = getIntent().getExtras();
如何从Activity1收到的捆绑包中获取字符串 解决方案:
String s = BundleFrom1.getString("EditText123");
请以较低的chase开头命名变量请勾选正确答案<代码>文本视图文本视图=(文本视图)findViewbyId(R.id.textview1);textview.setText代码>