问题
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:
Solution:
String s = BundleFrom1.getString("EditText123");
please name the variables with lower chase beginning
来源:https://stackoverflow.com/questions/7652829/string-back-from-bundle