Last active
June 13, 2016 11:34
-
-
Save aldakur/8d584d19cf7e0e1ede99de1ab0789476 to your computer and use it in GitHub Desktop.
#android Transfer data between activities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//First activity (ActivityA). The data is in editText (et1) | |
Intent i = new Intent(this, ActivityB.class); | |
i.putExtra("textByUser", et1.getText().toString()); | |
startActivity(i); | |
//Second activity (ActivityB). Get data | |
Bundle bundle = getIntent().getExtras(); | |
String data = bundle.getString("textByUser"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment