如何通过intent和bundle将textview的值获取到android中的两个不同活动请告诉我..我的代码如下:
Activity1.java
Intent intent = new Intent(Activity1.this,Activity2.class);
Bundle bundle = new Bundle();
bundle.putString("title",ed1.getText().toString());
intent.putExtras(bundle);
startActivity(intent);
Activity2.java
Intent intent = new Intent(Activity1.this,Activity2.class);
Bundle bundle = this.getIntent().getExtras();
String title = bundle.getString("title");
tv = (TextView)findViewById(R.id.projectTitle);
tv.setText(title);
bundle.putString("tit",title);
Activity3.java B
undle bundle = this.getIntent().getExtras();
tv = (TextView)findViewById(R.id.Projecttitle);
tv.setText(til);
它在活动 1 和活动 2 中运行良好,但在活动 2 和活动 3 之间运行良好