0

From 1st ACTIVITY

Intent IntentButton = new Intent();
IntentButton.setClass(this, PaliActivity2.class);
IntentButton.putExtra("EditText123", EditText1.getText().toString());
startActivity(IntentButton);

2nd ACTIVITY

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);                     
setContentView(R.layout.nextscreen);
Bundle BundleFrom1 = getIntent().getExtras();

How to get the String back from Bundle received from Activity1???

1 Answers1

1

Solution:

String s = BundleFrom1.getString("EditText123");

please name the variables with lower chase beginning

test123123
  • 911
  • 3
  • 16
  • 33
  • please tick the right answer. `TextView textview = (Textview) findViewbyId(R.id.textview1); textview.setText(s);` – test123123 Oct 04 '11 at 20:34