Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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???

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
476 views
Welcome To Ask or Share your Answers For Others

1 Answer

Solution:

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

please name the variables with lower chase beginning


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...