Im creating a simple app which is for example i got 10 table row with check box and user click on 3 box and press next, i wan to print out only the 3 row the use clicked and adding extra button/icon beside it. Is it possible? please help ! Thank you !
Asked
Active
Viewed 150 times
0
-
Google *pass data in bundle to next activity* – SweetWisher ツ Dec 06 '14 at 09:13
-
possible duplicate of [Passing data properly in android?](http://stackoverflow.com/questions/6998564/passing-data-properly-in-android) – SweetWisher ツ Dec 06 '14 at 09:14
-
possible duplicate of [How do I pass data between activities in Android?](http://stackoverflow.com/questions/2091465/how-do-i-pass-data-between-activities-in-android) – Idan Magled Dec 06 '14 at 09:14
-
Yes it is possible. You can use append your selected string to StringBuilder and pass it through Bundle. – Piyush Dec 06 '14 at 09:15
-
@GlynnNeo Check this http://stackoverflow.com/questions/8167088/appending-with-stringbuilder – Piyush Dec 06 '14 at 09:18
3 Answers
0
to pass data to another Activity
you can use Intent
s and putting your data as extra :
here is a sample :
Intent intent = new Intent(this, SecondActivity.class);
intent.putExtra("data", "My data in second activity");
startActivity(intent);
and for retrieving data in SecondActivity
:
String data = getIntent().getStringExtra("data");

Mohammad Rahchamani
- 5,002
- 1
- 26
- 36
0
Yes, use putExtra
and pass an ArrayList
of String
:
Intent intent = new Intent(Recipes2.this, XMLParser.class);
intent.putStringArrayListExtra("myList", (ArrayList<String>) myList);
startActivity(intent);

Piyush
- 18,895
- 5
- 32
- 63

Blaze Tama
- 10,828
- 13
- 69
- 129
0
Here is the answer:
Intent intent = new Intent(getBaseContext(), SignoutActivity.class);
intent.putExtra("EXTRA_SESSION_ID", sessionId);
startActivity(intent)
For more information check this link.

Vikasdeep Singh
- 20,983
- 15
- 78
- 104