I have two Intent
s and two Activity
s.
I have in the first Intent
an EditText
.
I want to use the text in the EditText
in the second intent and pass to the second intent
Intent myIntent = new Intent(mycurentActivity.this, secondActivity.class);
startActivity(myIntent);
Thank you in advance
Your looking for Intent#putExtra(String, String).
Here is an example:
Intent myIntent = new Intent(mycurentActivity.this, secondActivity.class);
myIntent.putExtra("key", myEditText.Text.toString();
startActivity(myIntent);
When your receiving the Intent you can extract it again:
String text = myIntent.getStringExtra("key");
(http://developer.android.com/reference/android/content/Intent.html#getStringExtra(java.lang.String))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With