Am sending a few variables from main.java
:
Bundle bund = new Bundle();
Intent intent = new Intent(this, newWindow.class);
String name = editName.getText().toString();
bund.putString(yourName, name);
String pass= editPassword.getText().toString();
bund.putString(yourPass,pass);
String mail=EditMail.getText().toString();
bund.putString(yourMail,mail);
intent.putExtras(bund);
startActivity(intent);
to newWindow.java
:
Intent intent = getIntent();
Bundle extras = intent.getExtras();
String name = extras.getString(main.yourName);
String mail = extras.getString(main.yourMail);
String pass = extras.getString(main.yourPass);
viewText1 = (TextView) findViewById(R.id.textView2);
viewText2 = (TextView) findViewById(R.id.textView3);
viewText3 = (TextView) findViewById(R.id.textView4);
viewText1.setText(name);
viewText2.setText(mail);
viewText3.setText(pass);
The problem is, only last variable is passed and showed in all 3 textview's
Why not avoid the Bundle part ?
Simply in the FirstActivity, try this
Then in RecievingActivity do this
Let me know if it helps